blob: c6279dc99b4305c0c040a6489fe3646061492da1 (
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
33
34
35
36
|
{ inputs, lib, ... }:
let
build-tmp = "/var/tmp";
in {
nix = {
settings = {
auto-optimise-store = lib.mkDefault true;
build-dir = build-tmp;
experimental-features = [ "nix-command" "flakes" ];
trusted-users = [ "root" "@wheel" ];
warn-dirty = false;
};
# Garbage Collection
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
persistent = true;
randomizedDelaySec = "14m";
};
};
systemd = {
services."nix-daemon".environment.TMPDIR = build-tmp;
user.services."nix-gc" = {
description = "Garbage collection for user profiles";
script = "/run/current-system/sw/bin/nix-collect-garbage --delete-older-than 30d";
startAt = "daily";
};
};
}
|