From 65dc95e52f4919423834efbbbbc8a94d9aefd2c4 Mon Sep 17 00:00:00 2001 From: Flo Date: Sun, 24 Nov 2024 15:12:14 +0100 Subject: [PATCH] feat: Allow setting a password on cmdline for pxe boot --- nixos/modules/installer/netboot/netboot.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nixos/modules/installer/netboot/netboot.nix b/nixos/modules/installer/netboot/netboot.nix index adcc10316fea..fa477a11a4f7 100644 --- a/nixos/modules/installer/netboot/netboot.nix +++ b/nixos/modules/installer/netboot/netboot.nix @@ -141,6 +141,17 @@ with lib; # /etc/NIXOS tag. touch /etc/NIXOS ${config.nix.package}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system + + # Set password for user nixos if specified on cmdline + # Allows using nixos-anywhere in headless environments + for o in $(