customizations
This commit is contained in:
parent
26139b62dd
commit
6b479a0c55
3 changed files with 22 additions and 14 deletions
|
|
@ -1,16 +1,22 @@
|
||||||
NixOS installer (flake + Lix)
|
Nanuqsaurus NixOS installer
|
||||||
=============================
|
===========================
|
||||||
|
|
||||||
1) Build is prewired with Lix; the installer ISO includes the repo at /etc/nixos.
|
Run the non-interactive installer:
|
||||||
2) Run the non-interactive Btrfs installer (set envs as needed):
|
|
||||||
|
|
||||||
sudo DISK=/dev/vda HOSTNAME=installer /etc/nixos/scripts/install-btrfs.sh
|
sudo /etc/nixos/scripts/install-btrfs.sh
|
||||||
|
|
||||||
Defaults: DISK=/dev/vda, HOSTNAME=installer
|
|
||||||
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.
|
Optionally set DISK and HOSTNAME
|
||||||
|
|
||||||
Notes
|
sudo DISK=/dev/vda HOSTNAME=nanuqsaurus /etc/nixos/scripts/install-btrfs.sh
|
||||||
- Filesystem is Btrfs with subvolumes: root, home, nix.
|
|
||||||
- The flake lives under /etc/nixos on the target; edit hosts/<hostname>.nix to customize.
|
|
||||||
|
The script wipes the whole disk, creates Btrfs subvolumes (root, home, nix), copies the flake, generates hardware config, and installs.
|
||||||
|
|
||||||
|
|
||||||
|
If you need a more custom setup please run the partitioning manually, mount the target to /mnt and then install the system:
|
||||||
|
|
||||||
|
nixos-install --root /mnt --flake "/mnt/etc/nixos#${HOSTNAME}" --no-root-passwd
|
||||||
|
|
||||||
|
|
||||||
|
After install finishes, reboot into the new system.
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
../modules/users/admin.nix
|
../modules/users/admin.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "nix-installer";
|
networking.hostName = "nanuqsaurus";
|
||||||
|
|
||||||
environment.etc."INSTALL.txt".source = ../docs/install-help.txt;
|
environment.etc."INSTALL.txt".source = ../docs/install-help.txt;
|
||||||
environment.etc."motd".text = builtins.readFile ../docs/install-help.txt;
|
environment.etc."motd".text = builtins.readFile ../docs/install-help.txt;
|
||||||
|
|
|
||||||
6
scripts/install-btrfs.sh
Normal file → Executable file
6
scripts/install-btrfs.sh
Normal file → Executable file
|
|
@ -2,14 +2,16 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# Non-interactive Btrfs installer using the flake in this repo.
|
# Non-interactive Btrfs installer using the flake in this repo.
|
||||||
# Defaults: DISK=/dev/vda HOSTNAME=installer
|
# Defaults: DISK=/dev/vda HOSTNAME=nanuqsaurus
|
||||||
|
|
||||||
DISK=${DISK:-/dev/vda}
|
DISK=${DISK:-/dev/vda}
|
||||||
HOSTNAME=${HOSTNAME:-installer}
|
HOSTNAME=${HOSTNAME:-nanuqsaurus}
|
||||||
|
|
||||||
SCRIPT_DIR=$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
SCRIPT_DIR=$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
REPO_ROOT=$(cd -- "${SCRIPT_DIR}/.." && pwd)
|
REPO_ROOT=$(cd -- "${SCRIPT_DIR}/.." && pwd)
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
echo "[1/7] Partitioning ${DISK}"
|
echo "[1/7] Partitioning ${DISK}"
|
||||||
printf "label: gpt\n,550M,U\n,,L\n" | sfdisk "${DISK}"
|
printf "label: gpt\n,550M,U\n,,L\n" | sfdisk "${DISK}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue