diff --git a/modules/nixos/nix.nix b/modules/nixos/nix.nix index e673917..44265d4 100644 --- a/modules/nixos/nix.nix +++ b/modules/nixos/nix.nix @@ -7,6 +7,45 @@ with lib; { config = { nixpkgs.config.allowUnfree = true; + # Yet more theft from orual. This seems about right. + services.angrr = { + enable = true; + settings = { + temporary-root-policies = { + direnv = { + path-regex = "/\\.direnv/"; + period = "14d"; + }; + result = { + path-regex = "/result[^/]*$"; + period = "3d"; + }; + }; + profile-policies = { + system = { + keep-booted-system = true; + keep-current-system = true; + keep-latest-n = 10; + keep-since = "14d"; + profile-paths = [ + "/nix/var/nix/profiles/system" + ]; + }; + user = { + enable = true; + keep-booted-system = true; + keep-current-system = true; + keep-latest-n = 2; + keep-since = "1d"; + profile-paths = [ + "~/.local/state/nix/profiles/profile" + "/nix/var/nix/profiles/per-user/root/profile" + ]; + }; + }; + }; + }; + nix = { gc = { automatic = true;