mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 03:29:45 +01:00
nix-gc: remove extraneous quotes from shell script
This commit is contained in:
parent
4fcd54df7c
commit
58cef37962
3 changed files with 16 additions and 3 deletions
|
@ -111,10 +111,10 @@ in {
|
|||
Unit = { Description = "Nix Garbage Collector"; };
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = toString (pkgs.writeShellScript "nix-gc" ''
|
||||
exec "${nixPackage}/bin/nix-collect-garbage ${
|
||||
ExecStart = toString (pkgs.writeShellScript "nix-gc"
|
||||
"exec ${nixPackage}/bin/nix-collect-garbage ${
|
||||
lib.optionalString (cfg.options != null) cfg.options
|
||||
}"'');
|
||||
}");
|
||||
};
|
||||
};
|
||||
systemd.user.timers.nix-gc = {
|
||||
|
|
|
@ -25,5 +25,16 @@
|
|||
timerFile=$(normalizeStorePaths $timerFile)
|
||||
|
||||
assertFileContent $timerFile ${./expected.timer}
|
||||
|
||||
nixgcScriptFile=$(grep -o \
|
||||
'/nix/store/.*-nix-gc' \
|
||||
$TESTED/home-files/.config/systemd/user/nix-gc.service
|
||||
)
|
||||
|
||||
assertFileExists $nixgcScriptFile
|
||||
|
||||
nixgcScriptFile=$(normalizeStorePaths $nixgcScriptFile)
|
||||
|
||||
assertFileContent $nixgcScriptFile ${./nix-gc-script-expected}
|
||||
'';
|
||||
}
|
||||
|
|
2
tests/modules/services/nix-gc/nix-gc-script-expected
Normal file
2
tests/modules/services/nix-gc/nix-gc-script-expected
Normal file
|
@ -0,0 +1,2 @@
|
|||
#!/nix/store/00000000000000000000000000000000-bash/bin/bash
|
||||
exec @nix@/bin/nix-collect-garbage --delete-older-than 30d --max-freed $((64 * 1024**3))
|
Loading…
Reference in a new issue