From 04f0212de19ed1206eccc42c19e2b1464b446b5d Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sat, 28 Dec 2024 13:27:15 -0800 Subject: simplify a bit home-manager configuration --- nix/users/fcuny/dev.nix | 30 ++++++++++++++++++++++++++++++ nix/users/fcuny/go.nix | 21 --------------------- nix/users/fcuny/home-manager.nix | 24 +++--------------------- nix/users/fcuny/media.nix | 7 +++++++ nix/users/fcuny/shell.nix | 3 +++ 5 files changed, 43 insertions(+), 42 deletions(-) create mode 100644 nix/users/fcuny/dev.nix delete mode 100644 nix/users/fcuny/go.nix create mode 100644 nix/users/fcuny/media.nix diff --git a/nix/users/fcuny/dev.nix b/nix/users/fcuny/dev.nix new file mode 100644 index 0000000..7126723 --- /dev/null +++ b/nix/users/fcuny/dev.nix @@ -0,0 +1,30 @@ +{ config, pkgs, ... }: +{ + home.packages = with pkgs; [ + # go + go-tools + golangci-lint + gopls + delve + + # nix + nil # nix lsp + nix-direnv # integration with direnv + nixfmt-rfc-style # new formatter + + # rust + rustup + ]; + + programs.go = { + enable = true; + goPath = ".local/share/pkg.go"; + goBin = ".local/bin.go"; + goPrivate = [ + "github.rbx.com/*" + "github.com/fcuny/*" + ]; + }; + + home.sessionPath = [ config.home.sessionVariables.GOBIN ]; +} diff --git a/nix/users/fcuny/go.nix b/nix/users/fcuny/go.nix deleted file mode 100644 index c6c9cf6..0000000 --- a/nix/users/fcuny/go.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, pkgs, ... }: -{ - home.packages = with pkgs; [ - go-tools - golangci-lint - gopls - delve - ]; - - programs.go = { - enable = true; - goPath = ".local/share/pkg.go"; - goBin = ".local/bin.go"; - goPrivate = [ - "github.rbx.com/*" - "github.com/fcuny/*" - ]; - }; - - home.sessionPath = [ config.home.sessionVariables.GOBIN ]; -} diff --git a/nix/users/fcuny/home-manager.nix b/nix/users/fcuny/home-manager.nix index e450c24..e9a51a7 100644 --- a/nix/users/fcuny/home-manager.nix +++ b/nix/users/fcuny/home-manager.nix @@ -1,6 +1,6 @@ { darwin, systemName, ... }: -{ lib, pkgs, ... }: +{ lib, ... }: { home.stateVersion = "23.05"; @@ -14,26 +14,8 @@ ] ++ lib.optionals darwin [ ./1password.nix - ./go.nix + ./dev.nix + ./media.nix ] ++ lib.optionals (systemName == "hq-c02fk3q7md6t") [ ./work.nix ]; - - home.packages = - with pkgs; - [ - # encryption - age - - nil # nix lsp - nix-direnv # integration with direnv - nixfmt-rfc-style # new formatter - ] - ++ (lib.optionals (darwin) [ - # media - mpv - ffmpeg - - # rust - rustup - ]); } diff --git a/nix/users/fcuny/media.nix b/nix/users/fcuny/media.nix new file mode 100644 index 0000000..342cfb4 --- /dev/null +++ b/nix/users/fcuny/media.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + mpv + ffmpeg + ]; +} diff --git a/nix/users/fcuny/shell.nix b/nix/users/fcuny/shell.nix index 36b4267..7f4406d 100644 --- a/nix/users/fcuny/shell.nix +++ b/nix/users/fcuny/shell.nix @@ -10,6 +10,9 @@ in home.packages = with pkgs; [ + # encryption + age + # shell shellcheck -- cgit v1.2.3