nixpkgs/nixos/modules/installer/tools
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
..
nixos-build-vms Revert "treewide: use nativeBuildInputs with runCommand instead of inlining" 2022-12-26 21:05:35 +03:00
nixos-option nixos-option: add backwards compatibility layer 2021-07-10 22:32:26 +02:00
get-version-suffix installer/tools/get-version-suffix: set --git-dir 2022-06-27 14:28:03 +02:00
nix-fallback-paths.nix nixos/nix-fallback-paths: 2.11.1 -> 2.12.0 2022-12-07 04:42:28 +10:00
nixos-enter.sh nixos/nixos-enter: hide systemd-tmpfiles errors 2023-01-01 17:18:20 +01:00
nixos-generate-config.pl nixos-generate-config: substitute nix-instantiate 2022-07-07 18:42:44 +02:00
nixos-install.sh nixos-install: fix missing initrd.secrets paths 2023-01-16 02:31:01 +01:00
nixos-version.sh nixos-version: print error for missing revision to stderr 2023-01-03 20:40:35 +01:00
tools.nix use consistently user alice for examples 2022-08-05 13:13:24 +02:00