summaryrefslogtreecommitdiff
path: root/beta
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2024-07-04 13:08:15 +0200
committerChristoph Cullmann <cullmann@kde.org>2024-07-04 13:08:15 +0200
commit7261282a745316021f49e1744bdeac6168080029 (patch)
tree6991689d30fd96c57976041a031d494213fb5a9f /beta
parentd3de03009953054b2dfdf3540014bb6c0bde1670 (diff)
add install scripts
Diffstat (limited to 'beta')
-rwxr-xr-xbeta/install.sh3
-rwxr-xr-xbeta/post-install.sh4
-rwxr-xr-x[-rw-r--r--]beta/pre-install.sh (renamed from beta/install.txt)68
3 files changed, 7 insertions, 68 deletions
diff --git a/beta/install.sh b/beta/install.sh
new file mode 100755
index 0000000..058aeb8
--- /dev/null
+++ b/beta/install.sh
@@ -0,0 +1,3 @@
+# install
+
+nixos-install --option experimental-features 'nix-command flakes' --no-root-passwd --root /mnt
diff --git a/beta/post-install.sh b/beta/post-install.sh
new file mode 100755
index 0000000..dd09a6d
--- /dev/null
+++ b/beta/post-install.sh
@@ -0,0 +1,4 @@
+# unmount all stuff
+
+umount -Rl /data /mnt
+zpool export -a
diff --git a/beta/install.txt b/beta/pre-install.sh
index 4ff14ec..5e17659 100644..100755
--- a/beta/install.txt
+++ b/beta/pre-install.sh
@@ -1,12 +1,4 @@
#
-# enable ssh for root
-#
-
-systemctl start sshd
-sudo bash
-passwd
-
-#
# kill old efi boot stuff
#
@@ -109,63 +101,3 @@ mount
# configure
nixos-generate-config --root /mnt
-
-# save /mnt/etc/nixos/hardware-configuration.nix /mnt/etc/nixos/configuration.nix
-
-cp /mnt/etc/nixos/hardware-configuration.nix /tmp
-cp /mnt/etc/nixos/configuration.nix /tmp
-
-# copy config data
-
-sudo scp -r /data/nixos root@192.168.13.100:/mnt/data
-
-# install
-
-nixos-install --option experimental-features 'nix-command flakes' --no-root-passwd --root /mnt
-
-# unmount all stuff
-
-umount -Rl /data /mnt
-zpool export -a
-
-# sync all /data after the install
-
-sudo -E rsync -va --delete --one-file-system /data root@192.168.13.100:/
-
-#
-# after install tasks for extra file systems
-#
-
-# create vms disk
-
-DD=/dev/disk/by-id/ata-CT2000MX500SSD1_2138E5D5061F
-sgdisk --zap-all $DD
-blkdiscard -v $DD
-wipefs -a $DD
-
-sleep 5
-
-# ZFS zpool creation with encryption
-zpool create \
- -o ashift=12 \
- -o autotrim=on \
- -O acltype=posixacl \
- -O atime=off \
- -O canmount=off \
- -O compression=on \
- -O dnodesize=auto \
- -O normalization=formD \
- -O xattr=sa \
- -O mountpoint=none \
- -O encryption=on \
- -O keylocation=file:///data/nixos/key-vms.secret \
- -O keyformat=passphrase \
- vpool $DD
-
-sleep 5
-
-# create all the volumes
-zfs create -o mountpoint=legacy vpool/vms
-
-# update passphrase later
-# zfs change-key -o keylocation=file:///data/nixos/key-vms.secret vpool