Initial commit
This commit is contained in:
15
install.sh
Normal file
15
install.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
if [ -z "$1" ]; then
|
||||
echo "Error: argument is missing."
|
||||
echo "Usage: $0 <host-name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HOST_NAME=$1
|
||||
|
||||
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount "./hosts/$HOST_NAME/disko.nix"
|
||||
sudo nixos-generate-config --root /tmp/
|
||||
sudo cp /tmp/etc/nixos/hardware-configuration.nix "./hosts/$HOST_NAME/"
|
||||
sudo git add .
|
||||
sudo nixos-install --flake ".#$HOST_NAME" --root /mnt/
|
||||
Reference in New Issue
Block a user