home

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit dd9a8d67a6ad9719e8f852950ac1b42ecd473202
parent 025b71889e2b43dabb7c8ac2072e69100dd59056
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Wed, 10 Jun 2020 15:55:18 +0200

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>

Diffstat:
Msystems/modules/core/nix.nix | 2+-
Msystems/modules/profiles/laptop.nix | 3++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/systems/modules/core/nix.nix b/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; }; diff --git a/systems/modules/profiles/laptop.nix b/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; }; }