Commit dd9a8d67a6ad

Vincent Demeester <vincent@sbr.pm>
2020-06-10 15:55:18
nix: update gc to every 45 minutes…
… but condition it to ACPower only (aka on battery, do not run it) Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 025b718
Changed files (2)
systems
modules
systems/modules/core/nix.nix
@@ -13,7 +13,7 @@ in
     core.nix = {
       enable = mkOption { type = types.bool; default = true; description = "Enable core.nix"; };
       gcDates = mkOption {
-        default = "weekly";
+        default = "*:0/45";
         description = "Specification (in the format described by systemd.time(7)) of the time at which the garbage collector will run. ";
         type = types.str;
       };
systems/modules/profiles/laptop.nix
@@ -22,11 +22,12 @@ in
       "vm.dirty_writeback_centisecs" = 5000;
       "vm.dirty_expire_centisecs" = 5000;
     };
-    profiles.desktop.enable = true;
     environment.systemPackages = with pkgs; [
       lm_sensors
       powertop
       acpi
     ];
+    profiles.desktop.enable = true;
+    systemd.services.nix-gc.unitConfig.ConditionACPower = true;
   };
 }