Last active
September 11, 2020 20:12
-
-
Save RocketPuppy/c0ebeef94c3ecbff945314522068895b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boot.kernelPackages = pkgs.linuxPackages_5_7; | |
networking.interfaces.eno1 = { | |
ipv4 = { addresses = [{ address = "192.168.63.4"; prefixLength = 24; }]; }; | |
}; | |
services.openssh.enable = true; | |
services.openssh.permitRootLogin = "yes"; | |
users.users.node = { | |
isNormalUser = true; | |
password = "password"; | |
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
diskdev=${diskdev:-"/dev/sda"} | |
wipefs -fa $diskdev | |
parted -s $diskdev -- mklabel gpt | |
parted -s $diskdev -- mkpart primary 512MiB -2GiB | |
parted -s $diskdev -- mkpart primary linux-swap -2GiB 100% | |
parted -s $diskdev -- mkpart ESP fat32 1MiB 512MiB | |
parted -s $diskdev -- set 3 boot on | |
mkfs.ext4 -F -L root ''${diskdev}1 | |
mkswap -L swap ''${diskdev}2 | |
mkfs.fat -F 32 -n boot ''${diskdev}3 | |
swapon ''${diskdev}2 | |
echo "Waiting for labels to appear..." | |
sleep 5 | |
echo "Done" | |
mount -t ext4 /dev/disk/by-label/root /mnt | |
mkdir -p /mnt/boot | |
mount -t vfat /dev/disk/by-label/boot /mnt/boot | |
nixos-generate-config --root /mnt --force | |
nixos-install -v --no-root-passwd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment