new file: common/hardware-configuration.nix new file: common/home.nix new file: flake.nix new file: hosts/docker/configuration.nix new file: hosts/nixos/configuration.nix new file: hosts/nixos/home.nix new file: hosts/server/configuration.nix new file: install.sh new file: prepare.sh
29 lines
628 B
Bash
Executable File
29 lines
628 B
Bash
Executable File
#create MBR table
|
|
parted /dev/sda -- mklabel msdos
|
|
#create nixos partition
|
|
parted /dev/sda -- mkpart primary 1MB -8GB
|
|
#set nixos partition to bootable
|
|
parted /dev/sda -- set 1 boot on
|
|
# create swap partition
|
|
parted /dev/sda -- mkpart primary linux-swap -8GB 100%
|
|
|
|
#format OS partition
|
|
mkfs.ext4 -L nixos /dev/sda1
|
|
#format swap
|
|
mkswap -L swap /dev/sda2
|
|
|
|
#activate swap
|
|
swapon /dev/sda2
|
|
|
|
#mount nixos partition
|
|
mount /dev/disk/by-label/nixos /mnt
|
|
|
|
#Generate config
|
|
nixos-generate-config --root /mnt/
|
|
|
|
#copy customised configuration over
|
|
cp configuration.nix /mnt/etc/nixos/configuration.nix
|
|
|
|
nixos-install --no-root-passwd
|
|
|
|
reboot |