Commit Graph

35 Commits

Author SHA1 Message Date
Maurice Zhou
a67d02b8ac NixOS: configure users in configuration.nix, not per-host config
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2023-04-05 20:43:19 +03:00
Maurice Zhou
5b8c163e24 NixOS, Alpine Linux: mount datasets in Root on ZFS guide; immutable
root; GRUB update

Acknowledgement: @bjornstromberg
Closes #398

NixOS: remove NetworkManager by default, add note for enable

Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2023-04-03 13:23:54 +03:00
Maurice Zhou
e437989739 NixOS: add support for ARM64 architecture with UEFI firmware
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2023-03-20 13:21:47 +03:00
Maurice Zhou
6b8c308aad NixOS: enclose disk variable in double quotes
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2023-03-19 01:39:25 +03:00
Maurice Zhou
b6cf700f62 Update NixOS configuration, clean up RHEL, Fedora, Arch guide mount section
Closes #397

Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2023-03-18 21:58:25 +03:00
m3t
450f043363 NixOS Root on ZFS: fix config hints
Stay in sync with the config template generated by nixos-generate-config
2023-02-16 23:54:49 +03:00
Maurice Zhou
3a93793b53 NixOS Root on ZFS: add escape hatch for zfs rollback
Signed-off-by: Maurice Zhou <ja@apvc.uk>
2023-02-14 20:51:04 +03:00
Maurice Zhou
b3180fd225 NixOS Root on ZFS: wipe flash-based storage device.
Signed-off-by: Maurice Zhou <ja@apvc.uk>
2023-02-14 20:51:04 +03:00
Maurice Zhou
cc6d72c02d NixOS Root on ZFS: use Nix-config for multi-disk
NixOS has enjoyed popularity among ZFS users thanks to
its declarative configuration and native ZFS support.
However, the installation guide used hardcoded disk
names in configuration files, which is unnecessary and
is the source of difficulties in multidisk setups.

The guide is now rewritten to leverage expressions in
the Nix language to manage multidisk setups.

Also adds instruction on replacing failed disk.

Closes #385.

Signed-off-by: Maurice Zhou <ja@apvc.uk>
2023-02-12 19:24:24 +03:00
Maurice Zhou
1211e98faf NixOS Root on ZFS: Do not bind mount /boot/efi
Previously we used a bind mount from /boot/efis/*-part1
to /boot/efi to facilitate bootloader configuration.
Recent reports indicate that this bind mount prevents
the system from booting.  This pull request removes the
bind mount.

Closes #383.

Signed-off-by: Maurice Zhou <ja@apvc.uk>
2023-02-10 11:16:11 +03:00
FrostKiwi
0aaa23397e Remove instruction to block disk cache
By my understanding, unnecessary due to unmounting at the end of the instruction. Has lead to unstable and error-spewing ZFS setups, as discussed in this issue: https://github.com/NixOS/nixpkgs/issues/214871
2023-02-08 23:46:53 +03:00
Maurice Zhou
b35065b4fc Alpine: Use ZFS for /boot, updated bootloader instructions
Signed-off-by: Maurice Zhou <ja@apvc.uk>
2022-07-31 21:48:31 +03:00
Maurice Zhou
2766cb7197 Updates and cleanup for Arch, RHEL, NixOS and Fedora
Signed-off-by: Maurice Zhou <ja@apvc.uk>
2022-07-27 11:11:03 +03:00
Maria
c67000823a Update 2-system-configuration.rst (#321)
Add correct path to `aliases` file on immutable step
2022-06-22 13:31:06 +03:00
Maurice Zhou
077e24712a NixOS: update system major version inside configuration files
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2022-06-19 14:23:05 +03:00
Maurice Zhou
1cd6ef244f fix argument order
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2022-06-19 14:23:05 +03:00
Maurice Zhou
d9782f7877 NixOS: upgrade to 22.05, mail notification, procedure for system upgrade
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2022-06-19 14:23:05 +03:00
Maurice Zhou
0ff944c678 Fedora 36: bump version; backup bash input history for future reference
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2022-05-19 17:57:49 +03:00
Richard Laager
903d631033 Set encryption=on
encryption=aes-256-gcm is now the default.

anarcat mentioned this in PR #306.

Signed-off-by: Richard Laager <rlaager@wiktel.com>
2022-05-19 00:51:52 -05:00
Daniel Baker
58123389d6 Removing unnecessary usage mount/umounts of /boot/efi. /boot/efi is not used but /boot/efis is. 2022-04-12 12:43:52 +03:00
Daniel Baker
b29a791a6b Fixes 'attribute 'efi' already defined' error. 2022-03-31 17:06:20 +03:00
Maurice Zhou
2aa4040743 Fedora & RHEL: fix slow loading mpt3sas.
Credit: @mdiepart from #282

Closes #282 #262

Fix variable export before chroot

Credit: @mdiepart from #282

remind user to enable multi-disk support

NixOS: handle installation failure wrt encrypted boot pool

Closes #279
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2022-03-19 13:23:22 +03:00
Maurice Zhou
4c2bb3a230 Add users optional home directory to fstab
Closes #267

Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2022-02-15 18:09:30 +03:00
Maurice Zhou
11c527ed27 NixOS Root on ZFS: replace /boot/efi with primary disk esp
/boot/efi is used exclusively to mirror EFI contents to
other disks, as in `cp /boot/efi/EFI /boot/efis/disk{0,1,2}`

As shown in issue #256, this approach causes trouble with
`nixos-generate-config`, which fills filesystem type as 'none'.

This commit fixes this issue by removing /boot/efi mountpoint and
directly copy from '/boot/efis/primary-disk/EFI/'.

Closes #256

Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2022-02-15 17:30:27 +03:00
Maurice Zhou
891a5e1659 NixOS: remove encrypted swap section due to system bug
See https://github.com/NixOS/nixpkgs/issues/157989

Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2022-02-07 12:27:43 +03:00
Maurice Zhou
7b2af8129a NixOS: remove unnecessary import service for LUKS bpool
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2022-01-03 10:16:18 +03:00
Maurice Zhou
9dbfd5abd5 NixOS 21.11: always track the latest kernel compatible with ZFS
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2021-12-03 19:37:50 +03:00
Maurice Zhou
b3444163cd NixOS: upgrade to release 21.11 with ZFS 2.1.1
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2021-12-03 18:15:57 +03:00
Maurice Zhou
7dfc0591d8 NixOS: mount /boot/efi
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2021-12-03 18:15:57 +03:00
Maurice Zhou
d4ffbd73a8 NixOS: fix mirrored EFI system partition issue
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2021-12-03 18:15:57 +03:00
Maurice Zhou
8a396f32f7 GRUB: preliminary support for PBKDF2-only LUKS2
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2021-12-03 18:15:57 +03:00
ne9z
862c355d4e Fix /boot mounting and add notice for other keyboard layouts (#230)
* NixOS: add "X-mount.mkdir" mount option, fix unmounted /boot

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* add tips for keyboard layout support, closes #211

Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2021-11-21 17:52:03 +03:00
Maurice Zhou
f121be16dc For maximum compatibility and redudancy; mirrored vdev
is now always used for boot pool

Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2021-10-03 21:28:26 +03:00
Maurice Zhou
7fe3e8ceb1 NixOS on ZFS: replace manual root password generation with bash variable
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2021-10-03 21:28:26 +03:00
ne9z
a1f68c37e0 Add support for NixOS + Fedora, Arch, RH minor changes (#195)
* Add support for NixOS

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* updated files for immutable root fs

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* update ssh key location

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* change initrd host key name

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* add missing -p switch

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* comments about SSH and encrypted bpool

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* backup hardware-configuration.nix file

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* clearer wording for backup

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* global useDHCP flag is deprecated

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* point user to configuration.nix

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* fixes for systemd-autofs; network; typo

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* force command to return 0

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* fix command to postMount

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* fix mount command

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* escape $i

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* create mountpoints before booting

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* replace postDevice,preMount command

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* disable zfs-mount

Signed-off-by: Maurice Zhou <jasper@apvc.uk>

* generate machine-id

Signed-off-by: Maurice Zhou <jasper@apvc.uk>
2021-09-06 20:48:50 +03:00