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:
parent
db40fead89
commit
d34aaf7b3b
2 changed files with 2 additions and 0 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue