Skip to content

MAHDTech/nixos-installer

Repository files navigation

nix-installer

Installs NixOS using ZFS in an opinionated way.

Background

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

Usage

  1. Boot the NixOS Live ISO

  2. Setup Networking

  3. Copy the starting example configuration file (see configs folder for more examples)

export CONFIG_FILE="/tmp/config.yaml"

cp configs/example.yaml "${CONFIG_FILE}"
  1. Edit the configuration file as required
vim "${CONFIG_FILE}"
  1. 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
  1. 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

About

Installs NixOS in an opinionated way

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •