summaryrefslogtreecommitdiffstats
path: root/makefu/1systems/shack-autoinstall/uefi-partition.sh
diff options
context:
space:
mode:
authorlassulus <lass@blue.r>2018-09-18 15:47:03 +0200
committerlassulus <lass@blue.r>2018-09-18 15:47:03 +0200
commit245994cc7ace5a323c476ccc50fd4026b9353dc4 (patch)
treecf4a3d85c768bd1ca18913d17c67e07bcab95db7 /makefu/1systems/shack-autoinstall/uefi-partition.sh
parent1466d3e86abc4d85af6efe5a964df788cf0e36cc (diff)
parent8a756c7333e0e7c4a0433d68775f8d7c1a53b8b0 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/1systems/shack-autoinstall/uefi-partition.sh')
-rw-r--r--makefu/1systems/shack-autoinstall/uefi-partition.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/makefu/1systems/shack-autoinstall/uefi-partition.sh b/makefu/1systems/shack-autoinstall/uefi-partition.sh
new file mode 100644
index 000000000..4566b7dce
--- /dev/null
+++ b/makefu/1systems/shack-autoinstall/uefi-partition.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+set -euf
+p(){
+ parted -s ${disk} -- $@
+}
+p mklabel gpt
+p mkpart primary fat32 1M 551M
+p set 1 boot on
+p mkpart primary linux-swap 51M 4647M
+p mkpart primary ext2 4647M 100%
+udevadm settle
+mkfs.fat -nboot -F32 /dev/sda1
+
+udevadm settle
+mkswap ${disk}2 -L swap
+swapon -L swap
+mkfs.ext4 -L nixos ${disk}3
+mount LABEL=nixos /mnt
+mkdir /mnt/boot
+mount LABEL=boot /mnt/boot
+
+mkdir -p /mnt/etc/nixos
+cp ${./shack-config.nix} /mnt/etc/nixos/configuration.nix
+nixos-generate-config --root /mnt