No description
  • Nix 98.6%
  • Vim Script 1.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Renovate Bot 578828dfdf
All checks were successful
CI / build (push) Successful in 36s
Lock file maintenance
2026-08-31 03:30:09 +00:00
.claude Document how to update the swaysome flake input 2026-08-09 13:04:04 +03:00
.github/workflows Migrate flake input updates to Renovate 2026-08-02 10:21:56 +00:00
.zed Add zed task for switchingthe system config 2025-03-07 15:08:08 +02:00
home-configurations Modularize home/nixos config with dotfiles option hierarchy 2026-06-01 15:34:46 +03:00
home-modules Add proton-vpn package 2026-08-28 16:39:37 +03:00
nixos-configurations Setup tschingel 2026-08-01 20:40:21 +03:00
nixos-modules Use renamed programs.solaar.enable option 2026-08-20 22:38:14 +03:00
packages/dotfiles-enroll-tpm Setup tschingel 2026-08-01 20:40:21 +03:00
private@ed082e8672 Update private repo to fix formatting issue 2026-04-08 17:45:28 +03:00
.envrc Add initial legacy configuration 2025-02-22 20:40:24 +02:00
.gitignore Add pre-commit fmt hook 2025-03-04 14:40:29 +02:00
.gitmodules Update private submodule url 2025-03-03 21:21:46 +02:00
AGENTS.md Fix workspace background script event parsing 2026-06-09 15:18:55 +03:00
CLAUDE.md Create AGENTS.md 2026-05-26 13:56:40 +03:00
flake.lock Lock file maintenance 2026-08-31 03:30:09 +00:00
flake.nix Use qois cache on nixos-rebuild switch 2026-08-01 20:38:15 +00:00
README.md Setup tschingel 2026-08-01 20:40:21 +03:00
renovate.json Migrate flake input updates to Renovate 2026-08-02 10:21:56 +00:00

Fabian's Dotfiles

System Setup

🐈‍⬛ This is how the process should be, not how it has been done... yet 😉

  1. systemctl reboot --firmware-setup: Activate enrollment of new Secure Boot key in the UEFI
  2. Boot into NixOS Live system
  3. TODOs at this point:
    • sops secrets encryption stuff.
    • LUKS HDD encryption with sops stuff
    • sudo sbctl create-keys with sops stuff.
    • See qo.is docs for inspiration
    • Configure attic cache substitution in nixos installer
  4. nixos-anywhere --copy-host-keys --build-on-remote \
      --generate-hardware-config nixos-facter ./nixos-configurations/$REMOTE_HOST/facter.json
      --extra-files ... \
      --chown ... \
      --disk-encryption-keys ... \
      --flake .#$REMOTE_HOSTNAME
      root@$REMOTE_IP
    
    • TODO:
      • with the secrets from above
      • don't do nixos-anywhere phase reboot (secure boot keys not enrolled yet)
  5. sudo sbctl enroll-keys --microsoft: Enroll our keys in UEFI
    • Keeps microsoft keys - some vendor firmware and Windows dual boot require this.
  6. sudo sbctl verify: Verify Secure Boot signatures.
    • /boot/EFI/nixos/kernel*.efi is not supposed to be signed.
  7. systemctl reboot: Boot into your new, signed system.
  8. bootctl status: Verify that a secure boot worked.
    • If not, activate secure boot and try again: systemctl reboot --firmware-setup
  9. dotfiles-enroll-tpm: Enroll the boot PCR measurement based LUKS unlock:

Secure Boot & TPM Disk Unlock

See lanzaboote documentation for more information on how to enable secure boot.

  • With nixos-rebuild {switch|boot}, new EFI files will be automatically signed.
  • In case your firmware or boot process changes, you need to insert the luks password manually.
    • This should not happen just because of kernel updates (but might with boot param changes.)
    • After a successful boot, you can re-enroll the new secure state with dotfiles-enroll-tpm.

Measured Boot (lanzaboote autoEnrollKeys + systemd-pcrlock)

Hosts that set dotfiles.secureBoot.measured.enable (currently tschingel) skip the manual sbctl create-keys/enroll-keys steps above: lanzaboote generates the Secure Boot keys and enrolls them via systemd-boot, and locks the TPM2 policy to a systemd-pcrlock policy (PCRs 0/4/7) instead of static PCRs. configurationLimit is capped at 8.

Migrating an existing host (e.g. speer, ochsenchopf) to measured boot:

  1. Set on the host:
    dotfiles.secureBoot.measured = {
      enable = true;
      cryptenrollDevice = "<the host's LUKS2 block device>"; # optional; enables hands-off re-enroll
    };
    
    and keep configurationLimit <= 8 (fewer stored generations on the ESP).
  2. dotfiles-nixos-switch, then reboot so the keys are auto-enrolled.
  3. dotfiles-enroll-tpm once to seed the first TPM2 slot (uses the new pcrlock policy). If cryptenrollDevice is set, lanzaboote's autoCryptenroll re-enrolls automatically on later boot-measurement changes; otherwise re-run dotfiles-enroll-tpm after such changes.
  4. bootctl status to confirm Secure Boot is active.

Passphrase and SSH-in-initrd unlock remain available as fallback if the TPM policy fails.

Caveats:

  • autoCryptenroll handles only its single cryptenrollDevice. On hosts with a second LUKS2 volume (e.g. tschingel's encrypted swap), re-run dotfiles-enroll-tpm after boot-measurement changes to refresh that volume's TPM2 slot; otherwise it falls back to the passphrase prompt.
  • autoCryptenroll retries on every boot until the first slot exists — seed it with dotfiles-enroll-tpm on a quiet boot and don't run both concurrently.