aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/mercury/system/nix.nix
blob: c85afda76357724e39f7549eaab162aca9b16a17 (plain) (blame)
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
{ user, ... }:

{
  nix = {
    enable = true;
    daemonCPUSchedPolicy = "idle";

    settings = {
      cores = 0;
      max-jobs = "auto";
      trusted-users = [ user ];
      use-xdg-base-directories = true;
      experimental-features = [ "nix-command" "flakes" ];
      substituters = [ "https://attic.xuyh0120.win/lantian" ];
      trusted-public-keys = [ "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" ];
    };

    gc = {
      automatic = true;
      persistent = true;
      dates = "weekly";
    };

    optimise = {
      automatic = true;
      persistent = true;
      dates = "daily";
    };
  };
}