all repos — archive/nixos-configuration @ 3e054571d73ccacfec7b1d4714bfa74818b7affe

Superseded by nixfiles

Add nix configuration

Alan Pearce
commit

3e054571d73ccacfec7b1d4714bfa74818b7affe

parent

5a4ead8db870f7c9950d092d5dd3ec1c570024f2

1 file changed, 24 insertions(+), 0 deletions(-)

changed files
A modules/nix.nix
@@ -0,0 +1,24 @@
+{ config, pkgs, ... }: + +{ nix = { + buildCores = 0; + + daemonNiceLevel = 10; + daemonIONiceLevel = 4; + + extraOptions = '' + auto-optimise-store = true; + ''; + gc = { + automatic = true; + options = "--delete-older-than 30d"; + }; + }; + + system.autoUpgrade = { + enable = true; + }; + systemd.services.nixos-upgrade.script = '' + ${config.system.build.nixos-rebuild}/bin/nixos-rebuild boot ${toString config.system.autoUpgrade.flags} + ''; +}