main
nix 43 lines 839 Bytes
Raw
1 {
2 config,
3 inputs,
4 pkgs,
5 ...
6 }:
7
8 {
9 imports = [
10 inputs.fast-nix-gc.darwinModules.default
11 ];
12
13 environment.systemPackages = [
14 config.nix.package
15 ];
16
17 nix = {
18 # Backport of NixOS/nix#15992: a temp root registered while a GC is in its
19 # deletion phase was ignored, so per-build AddTempRoot pins raced the
20 # periodic GC and inputs/outputs were collected mid-build (NixOS/hydra#1806).
21 package = pkgs.nix.appendPatches [ ../../builders/common/nix-gc-addtemproot-race.patch ];
22
23 settings = {
24 extra-experimental-features = [
25 "nix-command"
26 "flakes"
27 ];
28 max-silent-time = 7200; # 2h
29 timeout = 43200; # 12h
30 };
31 };
32
33 services.fast-nix-gc = {
34 enable = true;
35 automatic = true;
36 startCalendarInterval = [
37 {
38 Minute = 15;
39 }
40 ];
41 };
42
43 }