No description
| modules | ||
| quickshell | ||
| secrets | ||
| wallpapers | ||
| .envrc | ||
| .gitignore | ||
| .sops.yaml | ||
| flake.lock | ||
| flake.nix | ||
| Justfile | ||
| README.md | ||
NixOS Configuration
Personal NixOS configuration using the den framework (dendritic pattern).
Hosts
| Hostname | Profile | GPU |
|---|---|---|
desktop |
Gaming + development | Nvidia |
notebook |
Portable development | Intel |
Prerequisites
Usage
# Rebuild and switch (uses current hostname automatically)
just switch
# Target a specific host
just switch desktop
just switch notebook
# Build only, without switching
just build
# Test (applies temporarily, reverts on next boot)
just test
# Update all inputs
just update
# Update a single input
just update-input nixpkgs
# Run garbage collection
just gc
# See what changed before switching
just diff
Secrets (SOPS + age)
Secrets are stored encrypted in secrets/secrets.yaml and decrypted at boot by sops-nix.
First-time setup on a new machine
-
Generate an age key:
mkdir -p /etc/sops/age age-keygen -o /etc/sops/age/keys.txt -
Add the new public key to
.sops.yamlunderkeys:. -
Re-encrypt secrets for all keys:
sops updatekeys secrets/secrets.yaml
Adding a new secret
- Edit the secrets file:
just secrets - Declare it in
modules/secrets.nixundersops.secrets.
Rotating the age key
- Generate a new key (step 1 above).
- Update
.sops.yamlwith the new public key. - Run
sops updatekeys secrets/secrets.yamlto re-encrypt.
Identity
All user identity (name, email, SSH key) lives in modules/identity.nix. Override the defaults there or in a profile-specific module when creating a new user profile.
Adding a new host
- Run
nixos-generate-configon the target machine and copy the output tomodules/_hardware/<hostname>-hardware.nix. - Add the host in
modules/den.nixunderden.hosts. - Define or reuse an aspect for the host profile.