2022-05-09 13:20:43 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
: << '```bash'
|
|
|
|
|
|
|
|
# System Installer Script
|
|
|
|
|
improve installation, add support for:
ZFS, encryption (keys, keystore, LUKS), bootFS, ephemeral root (tmpfs, ZFS, F2FS, ...), testing in qemu, options & debugging, ... and many small things
2022-05-31 03:41:28 +02:00
|
|
|
This is a minimal example for an adjusted NixOS system installation using the functions defined in [`../lib/setup-scripts/`](../lib/setup-scripts/).
|
|
|
|
See its [README](../lib/setup-scripts/README.md) for more documentation.
|
2022-05-09 13:20:43 +02:00
|
|
|
|
|
|
|
|
improve installation, add support for:
ZFS, encryption (keys, keystore, LUKS), bootFS, ephemeral root (tmpfs, ZFS, F2FS, ...), testing in qemu, options & debugging, ... and many small things
2022-05-31 03:41:28 +02:00
|
|
|
## (Example) Implementation
|
2022-05-09 13:20:43 +02:00
|
|
|
|
|
|
|
```bash
|
improve installation, add support for:
ZFS, encryption (keys, keystore, LUKS), bootFS, ephemeral root (tmpfs, ZFS, F2FS, ...), testing in qemu, options & debugging, ... and many small things
2022-05-31 03:41:28 +02:00
|
|
|
|
|
|
|
# Replace the entry point with the same function:
|
|
|
|
function install-system {( set -eu # 1: blockDevs
|
2022-05-09 13:20:43 +02:00
|
|
|
prepare-installer "$@"
|
improve installation, add support for:
ZFS, encryption (keys, keystore, LUKS), bootFS, ephemeral root (tmpfs, ZFS, F2FS, ...), testing in qemu, options & debugging, ... and many small things
2022-05-31 03:41:28 +02:00
|
|
|
do-disk-setup "${argv[0]}"
|
|
|
|
install-system-to $mnt
|
2022-05-09 13:20:43 +02:00
|
|
|
)}
|
improve installation, add support for:
ZFS, encryption (keys, keystore, LUKS), bootFS, ephemeral root (tmpfs, ZFS, F2FS, ...), testing in qemu, options & debugging, ... and many small things
2022-05-31 03:41:28 +02:00
|
|
|
|
|
|
|
# ... could also replace any other function(s) ...
|