diff options
Diffstat (limited to 'hosts/common/core')
| -rw-r--r-- | hosts/common/core/default.nix | 4 | ||||
| -rw-r--r-- | hosts/common/core/nix.nix | 35 |
2 files changed, 14 insertions, 25 deletions
diff --git a/hosts/common/core/default.nix b/hosts/common/core/default.nix index 8a0fe8a..0ef4182 100644 --- a/hosts/common/core/default.nix +++ b/hosts/common/core/default.nix @@ -17,12 +17,13 @@ pkgs.bind pkgs.binutils pkgs.bpftools - pkgs.bpftrace + #pkgs.bpftrace pkgs.bzip2 pkgs.colordiff pkgs.conntrack-tools pkgs.coreutils pkgs.cpio + pkgs.csvkit pkgs.curl pkgs.diceware pkgs.diffutils @@ -65,6 +66,7 @@ pkgs.parted pkgs.patchelf pkgs.pciutils + pkgs.perl540Packages.ArchiveZip pkgs.procps pkgs.progress pkgs.psmisc 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"; }; - } |
