aboutsummaryrefslogtreecommitdiffstats
path: root/hosts/common/core/nix.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/common/core/nix.nix')
-rw-r--r--hosts/common/core/nix.nix35
1 files changed, 11 insertions, 24 deletions
diff --git a/hosts/common/core/nix.nix b/hosts/common/core/nix.nix
index c6279dc..3aac7fc 100644
--- a/hosts/common/core/nix.nix
+++ b/hosts/common/core/nix.nix
@@ -1,36 +1,23 @@
{ inputs, lib, ... }:
-
-let
- build-tmp = "/var/tmp";
-in {
-
+{
nix = {
+ gc = {
+ automatic = true;
+ dates = "daily";
+ options = "--delete-older-than 7d";
+ randomizedDelaySec = "5min";
+ };
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";
- };
+ systemd.user.services."nix-gc" = {
+ description = "Garbage collection for user profiles";
+ script = "/run/current-system/sw/bin/nix-collect-garbage --delete-older-than 7d";
+ startAt = "daily";
};
-
}