Self-contained NixOS system and workspace configuration repository.
This repository houses the entire declarative environment for my machines. It is designed to be cloned directly to ~/config and manages everything from core system hardware profiles to user-space tools and encrypted secrets.
- Declarative & reproducible: The entire system is fully defined and reproducible across different hardware targets, like my Framework 13.
- Secret management: Secure, key-based credential handling integrated natively via Agenix.
- Custom automation: Handcrafted operational wrapper scripts to streamline background services like Rclone and Keymapper.
Agenix decrypts secrets during system activation using the host's SSH key (/etc/ssh/ssh_host_ed25519_key). This key must be listed as a recipient in secrets.nix for every secret the host needs.
If setting up a new machine, get its host key (cat /etc/ssh/ssh_host_ed25519_key.pub), add it to secrets.nix (on a machine with host key already configured), and re-encrypt all secrets with agenix -r before committing changes & pushing to GitHub. Afterwards, the new machine should be able to decrypt secrets automatically on activation (after pulling changes from the remote).
Alternatively you can skip re-encrypting secrets and use an existing key instead, with the steps listed below:
- Retrieve key from password manager, eg. "Agenix SSH (System) - Framework 13"
- Rewrite
/etc/ssh/ssh_host_ed25519_keywith the retrieved key - Ensure the key has the correct permissions:
chmod 600 /etc/ssh/ssh_host_ed25519_key./scripts/rebuild-switch.sh framework-13 --forcenixos-rebuild-switch framework-13Note: Other useful commands include
nixos-rebuild-switch-logs,nixos-rebuild-test.
Rclone frequently modifies the configuration file so making the config file read-only is not possible.
The file should be stored in tools/rclone/rclone.conf - as that's where existing services look for it.
In order to have rclone be fully functional, we need to decrypt the configuration first. If you have successfully installed the system, you can run:
decrypt-rclone-confOtherwise, if this doesn't work, run:
cd ~/config/nix/secrets && agenix --decrypt rclone-conf.age > ~/config/tools/rclone/rclone.confTo test if the config was passed correctly, run:
cat ~/config/tools/rclone/rclone.confRebuilding the system might be necessary in order to ensure that systemd services use the updated configuration.
If you need to update the rclone-configuration, run:
manage-secret rclone-conf.ageAlternatively:
cd ~/config/nix/secrets && EDITOR='zeditor --wait' agenix -e rclone-conf.ageAfter you finish updating the configuration, run decrypt-rclone-conf to update the local rclone configuration file.
The home server configuration provisions base system dependencies, firewall rules, and native storage points. Application-level services and environments are layered directly on top using the assets maintained in ./tools.
- Coolify / Docker: Container setups are kept in
./tools/coolifyand updated via the includedupgrade.shhelper logic. - Incus: Certificate at
./nix/nixos/hosts/home-server/certificates/incusused to authenticate to Incus Web UI. - Production Backups: Background maintenance workflows execute shell operations using encrypted variables parsed straight out of Agenix (e.g., database states for platforms like Audiobookshelf and custom web apps via restic / rclone).
In order to have good audio, we need to install Easyeffects (configured through Nix) and also the Framework DSP.
Run the installation steps detailed in the "Installing" section of the README (in the framework-dsp) repository.
Once that is completed, the profile "HifiScan+EEGuide" should be automatically selected on startup.
Secret management is handled by Agenix. To edit or create secrets you need your user key (~/.ssh/id_ed25519) listed as a recipient in secrets.nix (or manually specify the identity file through agenix -i).
Retrieve your user key from the password manager (e.g. "Agenix SSH - Framework 13 - e User"), copy it to
~/.ssh/id_ed25519, and runchmod 600 ~/.ssh/id_ed25519.
To update an existing secret:
manage-secret <secret-name>Or alternatively:
cd ~/config/nix/secrets && EDITOR='zeditor --wait' agenix -e # replace zeditor as neededCreating new secrets: add an entry to secrets.nix, then run manage-secret <secret-name>.
Secrets are not accessible in Nix configuration at nixos until committed to the repository. Reference them without the
.ageextension - this applies to home-manager configs too.
Service management commands:
rclone-status- View service status (real-time)rclone-logs- Follow service logsrclone-start- Start service (timer, path watcher, service)rclone-stop- Stop servicerclone-resync- Full resync (stops service, prompts confirmation, restarts)
Launch keymapper:
keymapper -c ~/config/tools/keymapper/configuration.confTo check if a specific Nix store path is available in a Cachix binary cache, you can use a simple curl command or specialized tools.
- Check a Specific Path via HTTP Every cached path has a corresponding .narinfo file containing its metadata. You can check for its existence by using the store path's hash:
Run curl:
curl -I https://<your-cache-name>.cachix.org/<hash>.narinfoHash can be the commit hash or the store path hash
Success (200 OK): The package is cached. Failure (404 Not Found): The package is not in the cache.
Notes available here