diff --git a/modules/core/nix.nix b/modules/core/nix.nix index 3932f4f..8392408 100644 --- a/modules/core/nix.nix +++ b/modules/core/nix.nix @@ -3,9 +3,7 @@ pkgs, config, ... -}: let - inherit (config.local.systemVars) username; -in { +}: { nix = { package = pkgs.lix; settings = { @@ -21,14 +19,6 @@ in { nixPath = ["nixpkgs=${inputs.nixpkgs}"]; }; - programs.nh = { - enable = true; - clean = { - enable = true; - extraArgs = "--keep-since 30d --keep 3"; - }; - }; - nixpkgs = { config = { allowUnfree = true; @@ -40,6 +30,4 @@ in { segger-jlink.acceptLicense = true; }; }; - - hjem.users.${username}.environment.sessionVariables.FLAKE = "${config.hjem.users.${username}.directory}/.dotfiles"; } diff --git a/modules/programs/default.nix b/modules/programs/default.nix index c063199..20f02a6 100644 --- a/modules/programs/default.nix +++ b/modules/programs/default.nix @@ -11,6 +11,7 @@ ./firefox.nix ./games.nix ./misc.nix + ./nh.nix ./thunar.nix ./waybar.nix ./wlogout.nix diff --git a/modules/programs/nh.nix b/modules/programs/nh.nix new file mode 100644 index 0000000..e34a443 --- /dev/null +++ b/modules/programs/nh.nix @@ -0,0 +1,21 @@ +{ + lib, + config, + ... +}: let + inherit (lib.modules) mkIf; + inherit (config.local.profiles) desktop; + inherit (config.local.systemVars) username; +in { + config = mkIf desktop.enable { + programs.nh = { + enable = true; + clean = { + enable = true; + extraArgs = "--keep-since 30d --keep 3"; + }; + }; + + hjem.users.${username}.environment.sessionVariables.FLAKE = "${config.hjem.users.${username}.directory}/.dotfiles"; + }; +}