summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2025-12-28 10:22:13 +0100
committeradikro <adikro@disroot.org>2025-12-28 10:22:13 +0100
commite62d5505293a7c26d33fd60130220f2dea920515 (patch)
tree22d4560f28315ec798db3050ca60cd581fec1bda /os
parent27ee582379442277853fe6935c80007da1f1cc50 (diff)
nh clean fixes plus some cli stuff
Diffstat (limited to 'os')
-rw-r--r--os/core/storage.nix13
-rw-r--r--os/srv/nix-helper.nix2
2 files changed, 9 insertions, 6 deletions
diff --git a/os/core/storage.nix b/os/core/storage.nix
index b498084..e4e282b 100644
--- a/os/core/storage.nix
+++ b/os/core/storage.nix
@@ -6,10 +6,10 @@ in
options.os.core.storage = {
enable = lib.mkEnableOption "enables storage management";
- keepDays = lib.mkOption {
+ cleanDates = lib.mkOption {
type = lib.types.int;
- default = 14;
- description = "Number of days to keep old Nix generations before GC";
+ default = "weekly";
+ description = "how often to clean the system of old generations";
};
};
config = lib.mkIf cfg.enable {
@@ -17,8 +17,11 @@ in
programs.nh = {
enable = true;
- clean.enable = true;
- clean.extraArgs = "--keep-days ${toString cfg.keepDays} --keep 5";
+ clean = {
+ enable = true;
+ dates = "${toString cfg.cleanDates}";
+ clean.extraArgs = "--keep 5";
+ };
};
services.fstrim.enable = true;
diff --git a/os/srv/nix-helper.nix b/os/srv/nix-helper.nix
index 4999908..fede111 100644
--- a/os/srv/nix-helper.nix
+++ b/os/srv/nix-helper.nix
@@ -12,7 +12,7 @@ in
programs.nh = {
enable = true;
- flake = "/etc/nixos";
+ osFlake = "/etc/nixos";
};
environment.systemPackages = with pkgs; [