aboutsummaryrefslogtreecommitdiffstats
path: root/ginaz/README
diff options
context:
space:
mode:
authorMark Nipper <nipsy@bitgnome.net>2024-02-26 15:53:49 -0800
committerMark Nipper <nipsy@bitgnome.net>2024-02-26 15:53:49 -0800
commit931658a79bb5a76e9d1d64bf0f09b8629c9083b1 (patch)
tree7ed5eac400e11d81e08523f35c28fb2fbcbb0d72 /ginaz/README
downloadnix-931658a79bb5a76e9d1d64bf0f09b8629c9083b1.tar
nix-931658a79bb5a76e9d1d64bf0f09b8629c9083b1.tar.gz
nix-931658a79bb5a76e9d1d64bf0f09b8629c9083b1.tar.bz2
nix-931658a79bb5a76e9d1d64bf0f09b8629c9083b1.tar.lz
nix-931658a79bb5a76e9d1d64bf0f09b8629c9083b1.tar.xz
nix-931658a79bb5a76e9d1d64bf0f09b8629c9083b1.tar.zst
nix-931658a79bb5a76e9d1d64bf0f09b8629c9083b1.zip
Add initial NixOS configuration for ginaz
Diffstat (limited to '')
-rw-r--r--ginaz/README48
1 files changed, 48 insertions, 0 deletions
diff --git a/ginaz/README b/ginaz/README
new file mode 100644
index 0000000..0d54d8d
--- /dev/null
+++ b/ginaz/README
@@ -0,0 +1,48 @@
+# boot NixOS installer
+# connect wireless
+# start terminal
+passwd
+sudo passwd
+sudo systemctl restart sshd
+# connect remotely via SSH to IP from: ip a s
+
+DISK=/dev/disk/by-id/nvme-SAMSUNG_MZVL21T0HCLR-00BL2_S64NNX0T233166
+cat /dev/urandom > ${DISK}
+wipefs ${DISK}; sgdisk -z ${DISK}; sgdisk -og ${DISK}
+sgdisk --new 1::+1G --typecode=1:EF00 --change-name=1:'boot' ${DISK}
+sgdisk --new 2::+32G --typecode=2:8200 --change-name=2:'swap' ${DISK}
+sgdisk --new 3::-0 --typecode=3:BF00 --change-name=3:'rpool' ${DISK}
+partprobe
+udevadm settle
+fdisk -l ${DISK}
+mkfs.fat -F32 -nboot ${DISK}-part1
+mkswap -L swap ${DISK}-part2
+swapon /dev/disk/by-label/swap
+zpool create -o ashift=12 -o autotrim=on -O acltype=posixacl -O compression=on -O dnodesize=auto -O normalization=formD -O encryption=on -O keyformat=passphrase -O keylocation=prompt -O relatime=on -O xattr=sa -O mountpoint=none -O canmount=off -f rpool ${DISK}-part3
+zfs create -p -o mountpoint=legacy rpool/local/root
+zfs snapshot rpool/local/root@blank
+mount -t zfs rpool/local/root /mnt
+mkdir /mnt/boot
+mount /dev/disk/by-label/boot /mnt/boot
+zfs create -p -o mountpoint=legacy rpool/local/nix
+mkdir /mnt/nix
+mount -t zfs rpool/local/nix /mnt/nix
+zfs create -p -o mountpoint=legacy rpool/user/home/root
+mkdir /mnt/root
+mount -t zfs rpool/user/home/root /mnt/root
+zfs create -p -o mountpoint=legacy rpool/user/home/nipsy
+mkdir -p /mnt/home/nipsy
+mount -t zfs rpool/user/home/nipsy /mnt/home/nipsy
+
+nixos-generate-config --root /mnt
+
+cat <configuration.nix >/mnt/etc/nixos/configuration.nix
+cat <hardware-configuration.nix >/mnt/etc/nixos/hardware-configuration.nix
+
+#nixos-install --root /mnt
+nixos-install
+
+cd /
+umount -Rl /mnt
+zpool export -a
+reboot