modules: move nh from core/nix to programs

This is a user program, it cannot be in core.
This commit is contained in:
Anthony Rodriguez 2025-02-06 15:22:47 +01:00
parent 7dcc38f6a2
commit 4dcf7a0890
Signed by: nezia
SSH key fingerprint: SHA256:Ihfpl0rUpqDevYqnzSR34OYfVLbDNkBiUjs3CpX4ykA
3 changed files with 23 additions and 13 deletions

View file

@ -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";
}

View file

@ -11,6 +11,7 @@
./firefox.nix
./games.nix
./misc.nix
./nh.nix
./thunar.nix
./waybar.nix
./wlogout.nix

21
modules/programs/nh.nix Normal file
View file

@ -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";
};
}