nixos.sh 672 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. NIX_CONFIG=https://notabug.org/jgart/nixos_config/raw/master/configuration.nix
  3. #echo What is your network name?
  4. #read ssid
  5. #echo what is your network password?
  6. #read wifipassword
  7. #
  8. #wpa_supplicant -B -i wlp2s0 -c <(wpa_passphrase '$ssid' '$wifipassword')
  9. parted -s /dev/sda -- mklabel msdos
  10. parted -s /dev/sda -- mkpart primary 1MiB -8GiB
  11. parted -s /dev/sda -- mkpart primary linux-swap -8GiB 100%
  12. mkfs.btrfs -f -L nixos /dev/sda1
  13. mkswap -L swap /dev/sda2
  14. swapon /dev/sda2
  15. mount /dev/disk/by-label/nixos /mnt
  16. sleep 5
  17. nixos-generate-config --root /mnt
  18. curl $NIX_CONFIG > /mnt/etc/nixos/configuration.nix
  19. nixos-install
  20. reboot
  21. echo "Done! Rebooting!"