mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
podman: use serviceConfig.ExecStart instead of script (#390731)
This commit is contained in:
commit
41c7225648
1 changed files with 10 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, utils, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.virtualisation.podman;
|
cfg = config.virtualisation.podman;
|
||||||
json = pkgs.formats.json { };
|
json = pkgs.formats.json { };
|
||||||
|
@ -202,11 +202,15 @@ in
|
||||||
restartIfChanged = false;
|
restartIfChanged = false;
|
||||||
unitConfig.X-StopOnRemoval = false;
|
unitConfig.X-StopOnRemoval = false;
|
||||||
|
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
script = ''
|
ExecStart = utils.escapeSystemdExecArgs ([
|
||||||
${cfg.package}/bin/podman system prune -f ${toString cfg.autoPrune.flags}
|
(lib.getExe cfg.package)
|
||||||
'';
|
"system"
|
||||||
|
"prune"
|
||||||
|
"-f"
|
||||||
|
] ++ cfg.autoPrune.flags);
|
||||||
|
};
|
||||||
|
|
||||||
startAt = lib.optional cfg.autoPrune.enable cfg.autoPrune.dates;
|
startAt = lib.optional cfg.autoPrune.enable cfg.autoPrune.dates;
|
||||||
after = [ "podman.service" ];
|
after = [ "podman.service" ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue