mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 12:15:34 +03:00
nixos/nixos-containers: user options take precedence over module ones
I think this is the norm in NixOS modules. This allows to start a container with '--volatile=overlay --link-journal=host' in order to persist logs across runs of a container running with a temporary root. While '--ephemeral' omits '--link-journal=try-guest', it's not possible to run an ephemeral container when linking the journal: https://github.com/systemd/systemd/issues/1666
This commit is contained in:
parent
e3e32b642a
commit
c2d4e8f4cb
1 changed files with 1 additions and 1 deletions
|
@ -178,7 +178,6 @@ let
|
|||
exec ${config.systemd.package}/bin/systemd-nspawn \
|
||||
--keep-unit \
|
||||
-M "$INSTANCE" -D "$root" "''${extraFlags[@]}" \
|
||||
$EXTRA_NSPAWN_FLAGS \
|
||||
--notify-ready=yes \
|
||||
--kill-signal=SIGRTMIN+3 \
|
||||
--bind-ro=/nix/store:/nix/store$NIX_BIND_OPT \
|
||||
|
@ -203,6 +202,7 @@ let
|
|||
${optionalString (cfg.tmpfs != null && cfg.tmpfs != [])
|
||||
''--tmpfs=${concatStringsSep " --tmpfs=" cfg.tmpfs}''
|
||||
} \
|
||||
$EXTRA_NSPAWN_FLAGS \
|
||||
${containerInit cfg} "''${SYSTEM_PATH:-/nix/var/nix/profiles/system}/init"
|
||||
'';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue