nixpkgs/nixos/modules/installer
rnhmjoj 9fc47e6db3
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.
2023-01-16 02:31:01 +01:00
..
cd-dvd nixos/version: add config.system.nixos.distroName and config.system.nixos.distroId 2023-01-14 16:19:06 -05:00
netboot nixos/installer/netboot-minimal: add missing lib 2022-12-12 09:54:17 +08:00
scan [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
sd-card nixos: Add sd_image_minimal_new_kernel_no_zfs 2022-12-22 23:07:19 -05:00
tools nixos-install: fix missing initrd.secrets paths 2023-01-16 02:31:01 +01:00
virtualbox-demo.nix nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00