Fix registering valid paths in VM tests
Commit 37b56574e20755e4c58370bb18a3d373d4ae7cfc revealed that the code to get regInfo from /proc/cmdline was broken. It only happened to work because the kernel passes the command line to stage 1 through the environment, so $regInfo was set anyway.
This commit is contained in:
parent
37b56574e2
commit
ef5108f560
@ -306,11 +306,9 @@ in
|
|||||||
# dependency.)
|
# dependency.)
|
||||||
boot.postBootCommands =
|
boot.postBootCommands =
|
||||||
''
|
''
|
||||||
( source /proc/cmdline
|
if [[ "$(cat /proc/cmdline)" =~ regInfo=([^ ]*) ]]; then
|
||||||
if [ -n "$regInfo" ]; then
|
${config.environment.nix}/bin/nix-store --load-db < ''${BASH_REMATCH[1]}
|
||||||
${config.environment.nix}/bin/nix-store --load-db < $regInfo
|
|
||||||
fi
|
fi
|
||||||
)
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
virtualisation.pathsInNixDB =
|
virtualisation.pathsInNixDB =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user