all repos — nixfiles @ 496b4ed379afe7f1e0563243a0a5efe0857fe3bb

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

modules/nix.nix (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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}
    '';
  };
}