Installs NixOS using ZFS in an opinionated way.
This installs NixOS;
- Using a dedicated UEFI drive.
- Uses entire disk or disks for ZFS as the root filesystem with optional stripe or mirror.
- Configures common mount paths as ZFS datasets
- Configures the system to use the specified flake
-
Boot the NixOS Live ISO
-
Setup Networking
-
Copy the starting example configuration file (see configs folder for more examples)
export CONFIG_FILE="/tmp/config.yaml"
cp configs/example.yaml "${CONFIG_FILE}"
- Edit the configuration file as required
vim "${CONFIG_FILE}"
- Run the installer (nix version)
# Dry run
nix \
--extra-experimental-features nix-command \
--extra-experimental-features flakes \
run github:MAHDTech/nixos-installer \
-- \
-config "${CONFIG_FILE}"
# Nuke all the things.
nix \
--extra-experimental-features nix-command \
--extra-experimental-features flakes \
run github:MAHDTech/nixos-installer \
-- \
-config "${CONFIG_FILE}" \
-run
- Or, run the installer (go version)
nix-shell -p git go
git clone [email protected]:MAHDTech/nixos-installer.git
cd nixos-installer
# Dry run
sudo -E go run main.go \
-config "${CONFIG_FILE}"
# Nuke all the things but don't auto-install
sudo -E go run main.go \
-config "${CONFIG_FILE}" \
-run
# Nuke all the things and auto-install configured flake.
sudo -E go run main.go \
-config "${CONFIG_FILE}" \
-run \
-install