From 8e2c71d1ca85461c6295dba31481eadb07fdbb19 Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Sun, 14 Aug 2022 14:57:12 -0700 Subject: [PATCH] Tweak `nix.gc` module to more closely match NixOS module --- modules/services/nix-gc/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/services/nix-gc/default.nix b/modules/services/nix-gc/default.nix index d7b90da..fca6803 100644 --- a/modules/services/nix-gc/default.nix +++ b/modules/services/nix-gc/default.nix @@ -9,6 +9,11 @@ let in { + imports = [ + (mkRemovedOptionModule [ "nix" "gc" "dates" ] "Use `nix.gc.interval` instead.") + (mkRemovedOptionModule [ "nix" "gc" "randomizedDelaySec" ] "No `nix-darwin` equivilant to this NixOS option.") + (mkRemovedOptionModule [ "nix" "gc" "persistent" ] "No `nix-darwin` equivilant to this NixOS option.") + ]; ###### interface @@ -17,11 +22,12 @@ in nix.gc = { automatic = mkOption { - type = types.bool; default = false; + type = types.bool; description = "Automatically run the garbage collector at a specific time."; }; + # Not in NixOS module user = mkOption { type = types.nullOr types.str; default = null; @@ -35,9 +41,9 @@ in }; options = mkOption { - type = types.str; default = ""; example = "--max-freed $((64 * 1024**3))"; + type = types.str; description = '' Options given to nix-collect-garbage when the garbage collector is run automatically.