diff options
| author | Fuwn <[email protected]> | 2025-06-02 06:03:34 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-03 22:02:07 -0700 |
| commit | 0fbbee320baf5029050f7c85d3656b05537d4123 (patch) | |
| tree | 4280ab8415e98f25aaf1579396611268b87f4ff9 /hosts | |
| parent | Himeji: Conditional container pull policy (diff) | |
| download | nixos-config-0fbbee320baf5029050f7c85d3656b05537d4123.tar.xz nixos-config-0fbbee320baf5029050f7c85d3656b05537d4123.zip | |
Himeji: Conditional restart policy
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/himeji/configuration.nix | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/hosts/himeji/configuration.nix b/hosts/himeji/configuration.nix index 05362ff..04f7e04 100644 --- a/hosts/himeji/configuration.nix +++ b/hosts/himeji/configuration.nix @@ -18,10 +18,14 @@ containers = { engine = "docker"; - extraOptions = [ - "--restart=on-failure" - "--pull=${if config.modules.containers.engine == "podman" then "newer" else "always"}" - ]; + extraOptions = + let + engine = config.modules.containers.engine; + in + [ + "--pull=${if engine == "podman" then "newer" else "always"}" + ] + ++ (if engine == "podman" then [ "--restart=on-failure" ] else [ ]); }; }; }; |