diff options
| author | quentin@aristote.fr <quentin@aristote.fr> | 2023-08-09 20:43:52 +0200 |
|---|---|---|
| committer | quentin@aristote.fr <quentin@aristote.fr> | 2023-08-09 20:53:20 +0200 |
| commit | afcad6222a1e8bd6427e0ed1100bbd268de16475 (patch) | |
| tree | 736ea1eb22632e6561b78759d907e7b3a2608f7d /modules/nixos/personal/nix.nix | |
| parent | 861659c200c06984cf4b5dd924f362461c045593 (diff) | |
systemd: monitor: refactor options
Diffstat (limited to 'modules/nixos/personal/nix.nix')
| -rw-r--r-- | modules/nixos/personal/nix.nix | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/nixos/personal/nix.nix b/modules/nixos/personal/nix.nix index 8744e80..d1bd3cb 100644 --- a/modules/nixos/personal/nix.nix +++ b/modules/nixos/personal/nix.nix @@ -34,8 +34,11 @@ in { [ "--commit-lock-file" ] ++ pkgs.personal.lib.updateInputFlag "nixpkgs"; }; systemd.services = { - nix-gc.after = - lib.optional (cfg.autoUpgrade && cfg.gc.enable) "nixos-upgrade.service"; + nix-gc = { + after = lib.optional (cfg.autoUpgrade && cfg.gc.enable) + "nixos-upgrade.service"; + personal.monitor = true; + }; nix-gc-remove-dead-roots = { enable = cfg.gc.enable; description = "Remove dead symlinks in /nix/var/nix/gcroots"; @@ -43,9 +46,9 @@ in { script = "find /nix/var/nix/gcroots -xtype l -delete"; before = lib.mkIf config.nix.gc.automatic [ "nix-gc.service" ]; wantedBy = lib.mkIf config.nix.gc.automatic [ "nix-gc.service" ]; + personal.monitor = true; }; }; - personal.monitoring.services = [ "nixos-upgrade" "nix-gc" ]; programs.git = lib.mkIf (cfg.flake != null && lib.hasPrefix "git+file" cfg.flake) { enable = true; |
