diff options
| author | Sandro <sandro.jaeckel@gmail.com> | 2024-03-26 11:46:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-26 11:46:13 +0100 |
| commit | bba96255abf7e182cc2d7fbb6c51ff79e77825a0 (patch) | |
| tree | 810ac28bff638c71e08def8b2b27e13743279006 | |
| parent | Merge pull request #299134 from drupol/oterm/bump/0-2-4 (diff) | |
| download | nixpkgs-origin/build-vm-with-bootloader.tar.gz | |
nixos/boot: hint nixos-rebuild build-vm-with-bootloaderorigin/build-vm-with-bootloader
as that is one of the last boot methods that doesn't support initrd secrets
| -rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 02a3f5113cc0..9c8a66fe183c 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -699,16 +699,18 @@ in (builtins.isString source && hasPrefix builtins.storeDir source)) (attrValues config.boot.initrd.secrets); message = '' - boot.loader.initrd.secrets values must be unquoted paths when - using a bootloader that doesn't natively support initrd - secrets, e.g.: + boot.loader.initrd.secrets values must be unquoted paths + when using a bootloader that doesn't natively support initrd secrets, e.g.: boot.initrd.secrets = { "/etc/secret" = /path/to/secret; }; - Note that this will result in all secrets being stored - world-readable in the Nix store! + Note that this will result in all secrets being stored world-readable in the Nix store! + + If you are receiving this error by running `nixos-rebuild build-vm`, + you want to use `nixos-rebuild build-vm-with-bootloader` instead + to build a vm with a bootloader that supports initrd secrets. ''; } ]; |
