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 35f03cf90f
commit 76dbbd715b
Signed by: nezia
SSH key fingerprint: SHA256:Ihfpl0rUpqDevYqnzSR34OYfVLbDNkBiUjs3CpX4ykA
3 changed files with 23 additions and 13 deletions

View file

@ -3,9 +3,7 @@
pkgs, pkgs,
config, config,
... ...
}: let }: {
inherit (config.local.systemVars) username;
in {
nix = { nix = {
package = pkgs.lix; package = pkgs.lix;
settings = { settings = {
@ -21,14 +19,6 @@ in {
nixPath = ["nixpkgs=${inputs.nixpkgs}"]; nixPath = ["nixpkgs=${inputs.nixpkgs}"];
}; };
programs.nh = {
enable = true;
clean = {
enable = true;
extraArgs = "--keep-since 30d --keep 3";
};
};
nixpkgs = { nixpkgs = {
config = { config = {
allowUnfree = true; allowUnfree = true;
@ -40,6 +30,4 @@ in {
segger-jlink.acceptLicense = true; segger-jlink.acceptLicense = true;
}; };
}; };
hjem.users.${username}.environment.sessionVariables.FLAKE = "${config.hjem.users.${username}.directory}/.dotfiles";
} }

View file

@ -11,6 +11,7 @@
./firefox.nix ./firefox.nix
./games.nix ./games.nix
./misc.nix ./misc.nix
./nh.nix
./thunar.nix ./thunar.nix
./waybar.nix ./waybar.nix
./wlogout.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";
};
}