Install NixOS as a flake

This commit is contained in:
Manuel Thalmann 2023-12-02 01:26:41 +01:00
parent 7ed35a070c
commit 031fb5a54e

View file

@ -16,9 +16,7 @@ BOOT_MOUNTPOINT="/boot/efi" \
configRoot="$NIXOS_MOUNT_ROOT/etc/nixos";
mkdir -p "$configRoot";
git clone "$NIXOS_CONFIG_REPOSITORY" "$configRoot";
hostname "$NIXOS_HOSTNAME";
cd "$configRoot";
nixos-generate-config --root "$NIXOS_MOUNT_ROOT" --show-hardware-config > "$configRoot/hardware-configuration.nix";
nixos-install;
nixos-install --flake ".#$NIXOS_HOSTNAME";
popd > /dev/null;