-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·18 lines (17 loc) · 931 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
if [ "$1" = "secureboot" ]; then
nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko -f /home/nixos/flake/#"$2"
nix-shell -p sbctl --run 'sbctl create-keys'
mkdir -p /mnt/persistent/etc/secureboot
cp -r /etc/secureboot /mnt/persistent/etc/
cp -r /etc/secureboot /mnt/etc/
nixos-install --no-root-passwd --flake /home/nixos/flake#"$2" --cores 0 --root /mnt --accept-flake-config
elif [ "$1" = "rpi4-firmware" ]; then
cd /mnt/boot || exit
nix-shell -p wget --run 'wget https://github.com/pftf/RPi4/releases/download/v1.37/RPi4_UEFI_Firmware_v1.37.zip'
unzip RPi4_UEFI_Firmware_v1.37.zip
rm README.md RPi4_UEFI_Firmware_v1.37.zip
else
nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko -f /home/nixos/flake/#"$1"
nixos-install --no-root-passwd --flake /home/nixos/flake#"$1" --cores 0 --root /mnt --accept-flake-config
fi