Dendritic NixOS configuration using Den + flake-parts + flake-file.
| Host | Platform | Profile | Description |
|---|---|---|---|
laptop |
x86_64-linux | workstation | Hyprland desktop with DMS shell |
raspi |
aarch64-linux | server | Headless Raspberry Pi (planned) |
nix build .#installerFrom an existing machine, targeting a machine booted with the custom ISO (or any Linux with SSH):
# 1. Boot target machine with ISO, note its IP
# 2. Prepare extra-files
EXTRA=$(mktemp -d)
cp -r ~/nixos "$EXTRA/home/augusto/nixos"
mkdir -p "$EXTRA/etc/nixos/secrets"
read -s -p "Password: " PASS && echo
echo "$PASS" | mkpasswd -m yescrypt -s > "$EXTRA/etc/nixos/secrets/augusto-password"
# 3. Install WITHOUT auto-reboot
nixos-anywhere --flake ~/nixos#laptop \
--target-host root@<target-ip> \
--extra-files "$EXTRA" \
--chown /home/augusto 1000:100 \
--phases kexec,disko,install
# 4. Run post-install via nixos-enter
ssh root@<target-ip>
nixos-enter --root /mnt -- fish /etc/post-install.fish --tpm --fido --sops --git-init
# 5. Reboot
rebootThe --extra-files flag copies the repo to the target. Use --git-init in the
post-install script to restore git history from the remote.
# 1. Boot the custom ISO
# 2. Install (formats disk, copies embedded repo, runs nixos-install)
install-local laptop
# 3. Run post-install for TPM/FIDO2 enrollment
sudo nixos-enter --root /mnt -- fish /etc/post-install.fish --tpm --fido --sops
# 4. Reboot
rebootpost-install.fish [FLAGS]
--tpm Enroll TPM2 for LUKS auto-unlock
--fido Enroll FIDO2 key(s) for LUKS unlock
--fingerprint Show fingerprint enrollment instructions
--sops Generate age key and configure sops-nix
--dotfiles Clone dotfiles repo to ~/nixos
--media Clone media repo to ~/media
--git-init Initialize git in ~/nixos (for --extra-files installs)
# Full system rebuild
sudo nixos-rebuild switch --flake ~/nixos#laptop
# All flake inputs
nix flake update
# Neovim plugins only
update-neovim-plugins
# Firefox/Thunderbird extensions
update-firefox
update-thunderbird
# Regenerate flake.nix after changing module inputs
nix run .#write-flakefprintd-enroll
fprintd-enroll -f right-index-finger
fprintd-enroll -f right-middle-fingerSecrets are managed using sops-nix with age + GPG (YubiKey).
nix-shell -p age sops yq-go --run "fish ~/nixos/modules/security/secrets/sops-setup.fish"sops ~/nixos/modules/security/secrets/env.yamlAdd the secret key to modules/security/secrets/secrets.nix and the environment variable to the template.
firefoxpwa profile create --name "WhatsApp"firefoxpwa site install https://web.whatsapp.com/data/manifest.json \
--profile <PROFILE_ID> \
--name "WhatsApp" \
--icon-url "https://pngimg.com/uploads/whatsapp/whatsapp_PNG95154.png" \
--document-url "https://web.whatsapp.com/" \
--categories social- Launch the PWA once:
firefoxpwa site launch <SITE_ID> - Enable custom stylesheets:
printf 'user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);\nuser_pref("media.hardwaremediakeys.enabled", false);\nuser_pref("firefoxpwa.openOutOfScopeInDefaultBrowser", true);\nuser_pref("pdfjs.disabled", true);\n' > \
~/.local/share/firefoxpwa/profiles/<PROFILE_ID>/user.js- Create userChrome.css:
echo '#nav-bar { display: none !important; }
#TabsToolbar { display: none !important; }' > \
~/.local/share/firefoxpwa/profiles/<PROFILE_ID>/chrome/userChrome.cssAdd to the exec-once section in modules/desktop/hyprland.nix:
"uwsm app -- firefoxpwa site launch <SITE_ID>"