summaryrefslogtreecommitdiff
path: root/config/nix.nix
blob: ddc3bc5dffded296c8c4fbf19af2b5e4e356909b (plain)
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
26
27
28
29
30
31
32
{config, ...}: {
  personal.nix = {
    enable = true;
    autoUpgrade.enable = true;
    gc.enable = true;
    flake = "git+file:///etc/nixos/";
    remoteBuilds = {
      enable = true;
      machines.hephaistos = {
        enable = true;
        domain = "aristote.mesh";
        user = config.networking.hostName;
      };
    };
  };

  system.autoUpgrade.allowReboot = true;

  # disable remote builds
  nix.settings.max-jobs = 0;
  nixpkgs.flake = {
    setNixPath = true;
    setFlakeRegistry = true;
  };

  systemd.services.nixos-upgrade.serviceConfig = {
    MemoryAccounting = true;
    MemoryHigh = "0.9G";
    MemoryMax = "1G";
    MemorySwapMax = "0";
  };
}