Simplify installer script to non-interactive flow

This commit is contained in:
randogoth 2026-02-01 20:43:53 +02:00
parent defa82c46c
commit cd49f479dd
2 changed files with 27 additions and 203 deletions

View file

@ -1,17 +1,16 @@
NixOS installer (flake + Lix)
=============================
1) Build is prewired with Lix; the installer ISO includes the repo.
2) Run the guided Btrfs installer:
1) Build is prewired with Lix; the installer ISO includes the repo at /etc/nixos.
2) Run the non-interactive Btrfs installer (set envs as needed):
sudo ./scripts/install-btrfs.sh
sudo DISK=/dev/vda HOSTNAME=nixos /etc/nixos/scripts/install-btrfs.sh
- Interactive by default (choose disk, LUKS, swap).
- Non-interactive example:
sudo NON_INTERACTIVE=1 USE_LUKS=1 LUKS_PASSPHRASE='secret' SWAP_GB=4 DISK=/dev/sda HOSTNAME=myhost ./scripts/install-btrfs.sh
Defaults: DISK=/dev/vda, HOSTNAME=nixos
The script wipes the disk, creates Btrfs subvolumes (root, home, nix), copies the flake, generates hardware config, and installs with the chosen host name.
3) After install finishes, reboot into the new system.
Notes
- Filesystem is always Btrfs with subvolumes: root, home, nix (and swapfile if enabled).
- Filesystem is Btrfs with subvolumes: root, home, nix.
- The flake lives under /etc/nixos on the target; edit hosts/<hostname>.nix to customize.