1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 03:29:45 +01:00

nix-gc: set service type to oneshot

This commit is contained in:
Ninja3047 2024-07-29 16:45:50 -04:00 committed by Robert Helgesson
parent db40fead89
commit d34aaf7b3b
No known key found for this signature in database
GPG key ID: 96E745BD17AA17ED
2 changed files with 2 additions and 0 deletions

View file

@ -110,6 +110,7 @@ in {
systemd.user.services.nix-gc = { systemd.user.services.nix-gc = {
Unit = { Description = "Nix Garbage Collector"; }; Unit = { Description = "Nix Garbage Collector"; };
Service = { Service = {
Type = "oneshot";
ExecStart = toString (pkgs.writeShellScript "nix-gc" '' ExecStart = toString (pkgs.writeShellScript "nix-gc" ''
exec "${nixPackage}/bin/nix-collect-garbage ${ exec "${nixPackage}/bin/nix-collect-garbage ${
lib.optionalString (cfg.options != null) cfg.options lib.optionalString (cfg.options != null) cfg.options

View file

@ -1,5 +1,6 @@
[Service] [Service]
ExecStart=/nix/store/00000000000000000000000000000000-nix-gc ExecStart=/nix/store/00000000000000000000000000000000-nix-gc
Type=oneshot
[Unit] [Unit]
Description=Nix Garbage Collector Description=Nix Garbage Collector