From 10f8586a597c3c4d8d45d8c6b77c34547b370a89 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Mon, 18 Nov 2024 21:17:03 -0800 Subject: [PATCH] feat(home): nh --- Justfile | 4 ++-- homes/x86_64-linux/marley@nyx/default.nix | 1 + modules/home/programs/nh/default.nix | 23 +++++++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 modules/home/programs/nh/default.nix 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"; + }; +}