Fix registering valid paths in VM tests
Commit 37b56574e2
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.)
|
||||
boot.postBootCommands =
|
||||
''
|
||||
( source /proc/cmdline
|
||||
if [ -n "$regInfo" ]; then
|
||||
${config.environment.nix}/bin/nix-store --load-db < $regInfo
|
||||
fi
|
||||
)
|
||||
if [[ "$(cat /proc/cmdline)" =~ regInfo=([^ ]*) ]]; then
|
||||
${config.environment.nix}/bin/nix-store --load-db < ''${BASH_REMATCH[1]}
|
||||
fi
|
||||
'';
|
||||
|
||||
virtualisation.pathsInNixDB =
|
||||
|
Loading…
Reference in New Issue
Block a user