all repos — nixfiles @ 3e054571d73ccacfec7b1d4714bfa74818b7affe

System and user configuration, managed by nix and home-manager

Add nix configuration

Alan Pearce
commit

3e054571d73ccacfec7b1d4714bfa74818b7affe

parent

5a4ead8db870f7c9950d092d5dd3ec1c570024f2

2 files changed, 28 insertions(+), 0 deletions(-)

jump to
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} + ''; +}
M satoshipad.nixsatoshipad.nix
@@ -29,6 +29,7 @@ ./modules/satoshipay.nix
./modules/accounting.nix ./modules/passwords.nix ./modules/network-manager.nix + ./modules/nix.nix ]; boot.initrd.luks.devices = [
@@ -40,6 +41,9 @@ }
]; networking.hostName = "satoshipad"; + + nix.gc.dates = "12:00"; + system.autoUpgrade.dates = "12:24"; system.stateVersion = "17.03"; }