summary refs log tree commit diff
path: root/nixos/tests/installer.nix
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2023-01-15 02:47:28 +0100
committerrnhmjoj <rnhmjoj@inventati.org>2023-01-16 02:31:01 +0100
commit9fc47e6db3f2369e90cc0dec6c99b7a2501693e7 (patch)
tree13c7f36e5f8e428c6bd3c618e37e5a7fa90d71a7 /nixos/tests/installer.nix
parenteccc1e5bf482491187e914a4c37ba45a5de56703 (diff)
downloadnixpkgs-9fc47e6db3f2369e90cc0dec6c99b7a2501693e7.tar
nixpkgs-9fc47e6db3f2369e90cc0dec6c99b7a2501693e7.tar.gz
nixpkgs-9fc47e6db3f2369e90cc0dec6c99b7a2501693e7.tar.bz2
nixpkgs-9fc47e6db3f2369e90cc0dec6c99b7a2501693e7.tar.lz
nixpkgs-9fc47e6db3f2369e90cc0dec6c99b7a2501693e7.tar.xz
nixpkgs-9fc47e6db3f2369e90cc0dec6c99b7a2501693e7.tar.zst
nixpkgs-9fc47e6db3f2369e90cc0dec6c99b7a2501693e7.zip
nixos-install: fix missing initrd.secrets paths
When installing NixOS in the target filesystem /mnt, paths relative to
configuration.nix in `initrd.secrets` are turned by Nix into absolute
paths that reference /mnt. While building the system derivation works,
installing the bootloader fails because the latter process takes place
inside the chroot environment where /mnt does not exist.

Ideally, we would also build the system within chroot, but this greatly
complicates the matter as it requires  manually copying over Nix, its
runtime dependencies and all channels. Possibly, this would also break
several assumptions users have about how nixos-install works.

A simpler and safer (but less neat) solution is to temporarily bind
mount all mount points in /mnt under /mnt/mnt to keep the paths
functional while the bootloader is being installed.
This is essentially the workaround described in issue #73404.
Diffstat (limited to 'nixos/tests/installer.nix')
0 files changed, 0 insertions, 0 deletions