nixpkgs/nixos
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
..
doc Merge pull request #207466 from Patryk27/fix/174065 2023-01-15 18:52:09 +01:00
lib Merge pull request #208762 from ncfavier/link-manpages-options-doc 2023-01-09 11:57:01 +01:00
maintainers nixos/lxc-container: undo some of the minimal profile stuff 2022-12-09 23:18:37 +03:00
modules nixos-install: fix missing initrd.secrets paths 2023-01-16 02:31:01 +01:00
tests Merge pull request #208614 from LeSuisse/grub2-CVE-2022-2601-CVE-2022-3775 2023-01-15 23:23:33 +02:00
COPYING
default.nix
README
release-combined.nix nixos/tests/printing: split into service/socket 2022-12-07 15:57:45 +01:00
release-small.nix nixos/release: add acme to tested set 2022-10-25 07:22:27 +10:00
release.nix nixos: Add sd_image_minimal_new_kernel_no_zfs 2022-12-22 23:07:19 -05:00

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
https://nixos.org/nixos and in the manual in doc/manual.