1
0
Fork 0

Bin: refine installation script

This commit is contained in:
Aires 2024-07-03 12:43:17 -04:00
parent a327ffbb92
commit 22e2e4d8d2

View file

@ -37,7 +37,16 @@ mount -o subvol=@swap $root_drive /mnt/swap
# Create swapfile # Create swapfile
btrfs filesystem mkswapfile --size $(free -h --si | grep Mem: | awk '{print $2}') --uuid clear /mnt/swap/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 exit 0