From 22e2e4d8d2ac905fd86e55597812279986fa79df Mon Sep 17 00:00:00 2001 From: Andre Date: Wed, 3 Jul 2024 12:43:17 -0400 Subject: [PATCH] Bin: refine installation script --- bin/install-nixos.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/install-nixos.sh b/bin/install-nixos.sh index 2a058da..49ce670 100755 --- a/bin/install-nixos.sh +++ b/bin/install-nixos.sh @@ -37,7 +37,16 @@ mount -o subvol=@swap $root_drive /mnt/swap # Create swapfile btrfs filesystem mkswapfile --size $(free -h --si | grep Mem: | awk '{print $2}') --uuid clear /mnt/swap/swapfile -nixos-install --verbose --root /mnt --flake $flakeDir $( (( ask_root_password == false )) && echo "--no-root-password" ) +echo "Disks partitioned and mounted to /mnt." + +# Generate hardware-configuration.nix +nixos-generate-config --no-filesystems --dir /home/nixos +echo "Configuration files generated and saved to /home/nixos." + +echo "Setup complete!" +echo "To install, set up your system's configuration files under ./hosts/yourHost and add it to flake.nix." +echo "Then, run the following command:" +echo "nixos-install --verbose --root /mnt --flake $flakeDir.#yourHost $( (( ask_root_password == false )) && echo "--no-root-password" )" exit 0