Add a script for installing NixOS
This commit is contained in:
parent
dd991a91b3
commit
d54e818dc2
1 changed files with 20 additions and 0 deletions
20
scripts/NixOS/OS/setup.sh
Executable file
20
scripts/NixOS/OS/setup.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
|
||||
NIXOS_DISK="${NIXOS_DISK}";
|
||||
NIXOS_HOSTNAME="${NIXOS_HOSTNAME}";
|
||||
NIXOS_MOUNT_ROOT="${NIXOS_MOUNT_ROOT:-"/mnt"}";
|
||||
NIXOS_CONFIG_REPOSITORY="${NIXOS_CONFIG_REPOSITORY:-"https://git.nuth.ch/manuth/NixOSConfig"}";
|
||||
OS_LABEL="${OS_LABEL:-NixOS}";
|
||||
|
||||
OS_MOUNT_ROOT="${NIXOS_MOUNT_ROOT}" \
|
||||
OS_DISK="${NIXOS_DISK}" \
|
||||
OS_LABEL="${OS_LABEL}" \
|
||||
. "../../Common/OS/partition.sh";
|
||||
|
||||
configRoot="$NIXOS_MOUNT_ROOT/etc/nixos";
|
||||
mkdir -p "$configRoot";
|
||||
git clone "$NIXOS_CONFIG_REPOSITORY" "$configRoot";
|
||||
nixos-install;
|
||||
|
||||
popd > /dev/null;
|
Loading…
Reference in a new issue