diff --git a/Justfile b/Justfile index 0257665..6f5070a 100644 --- a/Justfile +++ b/Justfile @@ -4,7 +4,7 @@ default: alias dh := deployhome [group('home')] deployhome user=env_var('USER'): - home-manager switch -b bak --flake .#marley@nyx + nh home switch -c marley@nyx -b bak [group('home')] refreshhome: @@ -19,4 +19,4 @@ updatejust this: alias gc := collectgarbage collectgarbage: - nix-collect-garbage -d + nh clean all diff --git a/homes/x86_64-linux/marley@nyx/default.nix b/homes/x86_64-linux/marley@nyx/default.nix index 8d88b7c..4a541c8 100644 --- a/homes/x86_64-linux/marley@nyx/default.nix +++ b/homes/x86_64-linux/marley@nyx/default.nix @@ -52,6 +52,7 @@ in man = enabled; ncmpcpp = enabled; neo = enabled; + nh = enabled; rbw = enabled; ripgrep = enabled; ssh = enabled; diff --git a/modules/home/programs/nh/default.nix b/modules/home/programs/nh/default.nix new file mode 100644 index 0000000..4cee682 --- /dev/null +++ b/modules/home/programs/nh/default.nix @@ -0,0 +1,23 @@ +{ + lib, + config, + pkgs, + ... +}: +let + inherit (lib) mkEnableOption mkIf mkDefault; + + cfg = config.marleyos.programs.nh; + home = config.home.homeDirectory; +in +{ + options.marleyos.programs.nh.enable = mkEnableOption "nh"; + + config = mkIf cfg.enable { + home.packages = with pkgs; [ + nh + ]; + + home.sessionVariables.FLAKE = mkDefault "${home}/marleyos"; + }; +}