mirror of
https://github.com/EdenQwQ/nixos.git
synced 2025-12-26 18:34:56 +08:00
25 lines
537 B
Nix
25 lines
537 B
Nix
{
|
|
self,
|
|
host,
|
|
user,
|
|
pkgs,
|
|
inputs,
|
|
...
|
|
}:
|
|
{
|
|
programs.nh = {
|
|
enable = true;
|
|
package = inputs.nh.packages.${pkgs.stdenv.hostPlatform.system}.nh;
|
|
clean = {
|
|
enable = true;
|
|
dates = "3 days";
|
|
extraArgs =
|
|
let
|
|
numColorschemes = builtins.length self.homeConfigurations."${user}@${host}".config.colorSchemes;
|
|
numToKeep = numColorschemes * 2 |> toString;
|
|
in
|
|
"--keep ${numToKeep}";
|
|
};
|
|
};
|
|
environment.variables.NH_FLAKE = "/home/${user}/.config/nixos";
|
|
}
|