diff options
Diffstat (limited to 'modules/configuration/nix.nix')
-rw-r--r-- | modules/configuration/nix.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/configuration/nix.nix b/modules/configuration/nix.nix new file mode 100644 index 00000000..504942ec --- /dev/null +++ b/modules/configuration/nix.nix @@ -0,0 +1,25 @@ +{ config, pkgs, ... }: + +{ nix = { + buildCores = 0; + + daemonNiceLevel = 10; + daemonIONiceLevel = 4; + + autoOptimiseStore = true; + gc = { + automatic = true; + options = "--delete-older-than 30d"; + }; + }; + + system.autoUpgrade = { + enable = true; + }; + systemd.services.nixos-upgrade = { + environment.NIXPKGS_ALLOW_UNFREE = "1"; + script = '' + ${config.system.build.nixos-rebuild}/bin/nixos-rebuild boot ${toString config.system.autoUpgrade.flags} + ''; + }; +} |