A modern, pure-leaf dendritic NixOS and Home Manager configuration powered by Den, flake-file, devenv, and agenix-rekey.
- Awesome Nix
- Den Documentation
- NixOS Options Search
- Home Manager Options
- devenv Documentation
- flake-parts Documentation
This repository configures nixConfig for strict, safe, and cached builds:
nixConfig = {
accept-flake-config = true;
allow-import-from-derivation = true;
auto-optimise-store = true;
lazy-trees = true;
show-trace = true;
};The following files in this repository are generated and managed using the files flake-parts module:
README.md.workmux.yaml.nvim.lua
Nix files (they're all flake-parts modules) are automatically imported via import-tree. Nix files prefixed with an underscore are ignored. No literal path imports are used. This means files can be moved around and nested in directories freely.
This configuration uses den for declarative multi-entity system management.
| Entity | Purpose |
|---|---|
host |
Channel, networking, system configuration, hardware facts |
user |
Identity, home directory, Home Manager aspects |
Every feature in modules/aspects/ is organized as an atomic leaf aspect under den.aspects.*. Leaf aspects encapsulate their own NixOS, Home Manager, nixpkgs overlay, and impermanence persistence configurations in a single file, and are selectively composed by roles (den.aspects.roles.*) consumed by hosts:
modules/
├── aspects/
│ ├── applications/
│ │ ├── browsers/ # zen, firefox, librewolf, chromium, tor-browser, _common/
│ │ ├── dev/
│ │ │ ├── ai/ # llm-agents, opencode, pi, antigravity, copilot
│ │ │ ├── editor/ # neovim, helix, vim, lazyvim, doom-emacs, vscode, zed, codium
│ │ │ ├── git/ # git, github, lazygit
│ │ │ ├── lang/ # go, rust, node, elixir, lua, nix, cc, grammars
│ │ │ ├── mux/ # tmux, zellij, sesh, workmux, herdr
│ │ │ ├── networking/ # winbox, wireguard, mtr, doggo
│ │ │ ├── security/ # bitwarden, gpg, ssh, sops
│ │ │ ├── shell/ # direnv, mise, television, starship, zoxide, fzf, bat, btop, vivid, fastfetch
│ │ │ └── tree-sitter/ # grammars
│ │ ├── gaming/ # steam, mangohud, gamescope, gamemode, lutris, heroic, bottles, nix-ld
│ │ ├── media/ # mpv, vlc, rmpd, cava, yt-dlp, imv, feh, mpvpaper
│ │ ├── messaging/ # vesktop
│ │ ├── productivity/ # tuxedo, evince, foliate, galculator, localsend, anydesk, scrcpy
│ │ ├── shell/ # zsh (with histdb), carapace, yazi, superfile, cli-utils
│ │ ├── terminals/ # ghostty, kitty, foot
│ │ └── wayland/ # wl-kbptr, fuzzel, cliphist, quickshell, fcitx5
│ ├── core/ # boot, documentation, locale, mounts, networking, nix, nixpkgs, security, users
│ ├── desktop/ # audio, fonts, greeter, gtk, hyprland, kdeconnect, nautilus, niri, stylix, thunar, udiskie, xdg, xserver
│ ├── hardware/ # bluetooth, graphics, input, laptop, nixos, power, steam-hardware
│ ├── roles/ # default, workstation, dev, gaming
│ ├── secrets/ # agenix
│ ├── services/ # avahi, openssh, printing, samba, smartd, tailscale
│ └── virtualization/ # libvirt, podman, waydroid, vm-variant, looking-glass, windows-vm
├── classes/ # devenv, files, nix-unit, formatter
├── core/ # impermanence, policies, quirks
├── flake-parts/ # devenv, diagrams, files, flake-file, flake-root, formatter, meta, pkgs, wrappers
├── hosts/ # nixos, super, sandbox
└── users/ # artifex
Cross-cutting concerns collected from aspects and aggregated at host/user scope:
autostart cache cacheHome codium-extensions codium-settings firewall homeManagerModules nixpkgs-overlays persist persistHome secrets secretsHome
Hosts and user topologies are declared in modules/hosts/:
| Host | Architecture | User | Roles & Aspects |
|---|---|---|---|
nixos |
x86_64-linux |
artifex |
roles.default, roles.workstation, roles.dev, roles.gaming, hardware.nixos, secrets.agenix |
super |
x86_64-linux |
artifex |
roles.default, roles.workstation, roles.dev, roles.gaming, impermanence, secrets.agenix |
sandbox |
x86_64-linux |
artifex |
roles.default, applications.gaming.nix-ld (Isolated testbed host for rapid VM testing) |
The repository includes a reproducible developer environment configured in modules/flake-parts/devenv.nix and integrated via .envrc.
- Ensure direnv and nix-direnv are installed.
- Allow the environment in the repo root:
direnv allow
- Alternatively, enter the shell manually:
nix develop
Deploy system configurations safely using nh:
# Build toplevel derivation
nh os build
# Test build in a transient generation
nh os test
# Switch system generation and activate
nh os switchGenerate fleet visualization diagrams and update TOPOLOGY.md:
nix run .#write-topology