forked from mirrors/nixpkgs
Merge pull request #185129 from Munksgaard/fix-nixos-container
nixos-containers: Make sure same version of nixos-container is used
This commit is contained in:
commit
841bcc7a24
|
@ -9,6 +9,10 @@ let
|
|||
configurationDirectory = "/etc/${configurationDirectoryName}";
|
||||
stateDirectory = "/var/lib/${configurationPrefix}containers";
|
||||
|
||||
nixos-container = pkgs.nixos-container.override {
|
||||
inherit stateDirectory configurationDirectory;
|
||||
};
|
||||
|
||||
# The container's init script, a small wrapper around the regular
|
||||
# NixOS stage-2 init script.
|
||||
containerInit = (cfg:
|
||||
|
@ -250,7 +254,7 @@ let
|
|||
ExecReload = pkgs.writeScript "reload-container"
|
||||
''
|
||||
#! ${pkgs.runtimeShell} -e
|
||||
${pkgs.nixos-container}/bin/nixos-container run "$INSTANCE" -- \
|
||||
${nixos-container}/bin/nixos-container run "$INSTANCE" -- \
|
||||
bash --login -c "''${SYSTEM_PATH:-/nix/var/nix/profiles/system}/bin/switch-to-configuration test"
|
||||
'';
|
||||
|
||||
|
@ -868,9 +872,7 @@ in
|
|||
'';
|
||||
|
||||
environment.systemPackages = [
|
||||
(pkgs.nixos-container.override {
|
||||
inherit stateDirectory configurationDirectory;
|
||||
})
|
||||
nixos-container
|
||||
];
|
||||
|
||||
boot.kernelModules = [
|
||||
|
|
Loading…
Reference in a new issue