A dendritic NixOS configuration built around small composable modules. The default host is chapel, currently composed as hyprland + noctalia.
flake.nix
-> flake-parts
-> flake/hosts.nix
-> hosts/chapel
-> modules/nixos/*
-> modules/home/*
-> modules/home/desktops
-> modules/home/themes/noctalia.nix
| Task | Command |
|---|---|
| Switch to default Chapel | sudo nixos-rebuild switch --flake ~/nixos#chapel |
| Test without making boot default | sudo nixos-rebuild test --flake ~/nixos#chapel |
| Build only | nix build ~/nixos#nixosConfigurations.chapel.config.system.build.toplevel |
| Check flake | nix flake check |
| Run NVF package | nix run ~/nixos#nvf |
| Update inputs and switch | cd ~/nixos && nix flake update && sudo nixos-rebuild switch --flake .#chapel |
| Output | Purpose |
|---|---|
chapel |
Default system, currently hyprland + noctalia |
chapel-hyprland-noctalia |
Explicit alias for the current default variant |
packages.x86_64-linux.nvf |
Neovim package built from modules/nvf.nix |
.
├── flake.nix # inputs and flake-parts entrypoint
├── flake.lock # pinned input revisions
├── flake/ # flake-parts modules
│ ├── hosts.nix # host/desktop/theme composition
│ └── packages.nix # package outputs
├── hosts/
│ └── chapel/ # Chapel-specific system config
├── lib/
│ └── treeimport.nix # recursive importer for flake/*
├── modules/
│ ├── nixos/ # reusable NixOS modules
│ ├── home/ # reusable Home Manager modules
│ ├── home/desktops/ # Desktop-specific Home Manager config
│ ├── noctalia/ # Noctalia config and plugins
│ ├── starship/ # Starship config
│ ├── lucidglyph.nix # font rendering config
│ ├── nvf.nix # NVF config
│ └── zen.nix # Zen Browser wrapper
└── configuration.nix # compatibility shim importing hosts/chapel
flake.nix does not manually assemble every output. It calls flake-parts.lib.mkFlake and imports every module under flake/ through lib/treeimport.nix.
flake/hosts.nix defines the composition layer:
| Name | Role |
|---|---|
desktops |
Maps desktop names to system and Home Manager modules |
themes |
Maps theme names to Home Manager theme modules |
mkHost |
Combines host, desktop, theme, and optional extra modules |
The default host is declared like this:
chapel = mkHost {
hostname = "chapel";
desktop = "hyprland";
theme = "noctalia";
};| Change | File or directory |
|---|---|
| Hostname, boot, LUKS, host-only kernel settings | hosts/chapel/default.nix |
| Filesystems and generated hardware scan | hosts/chapel/hardware-configuration.nix |
| Common system packages and Nix settings | modules/nixos/core/default.nix |
| System services such as PipeWire, SDDM, OpenRGB daemon support | modules/nixos/services/default.nix |
| NVIDIA settings | modules/nixos/hardware/nvidia.nix |
| Steam, gamescope, gamemode, Heroic | modules/nixos/programs/gaming.nix |
| General user packages | modules/home/packages/default.nix |
| Shell aliases and CLI integrations | modules/home/shell/default.nix |
| Terminal packages and terminal config | modules/home/terminals/default.nix |
| GTK/Qt/cursor user styling | modules/home/appearance/default.nix |
| Home Manager app modules | modules/home/programs/ |
| XDG MIME apps and user dirs | modules/home/xdg/default.nix |
| Hyprland-only user packages/settings | modules/home/desktops/hyprland.nix |
| Noctalia theme integration | modules/home/themes/noctalia.nix |
| Font rendering and Lucidglyph | modules/lucidglyph.nix |
Example: add Git user config.
Create modules/home/programs/git.nix:
{...}: {
programs.git = {
enable = true;
userName = "Retr0astic";
userEmail = "you@example.com";
};
}Import it from modules/home/programs/default.nix:
{...}: {
imports = [
./documents.nix
./git.nix
./spicetify.nix
];
}To add niri + noctalia:
- Create the system module:
modules/nixos/desktops/niri.nix
- Create the Home Manager module:
modules/home/desktops/niri.nix
- Register the desktop in
flake/hosts.nix:
desktops = {
hyprland = {
system = ../modules/nixos/desktops/hyprland.nix;
home = ../modules/home/desktops/hyprland.nix;
};
niri = {
system = ../modules/nixos/desktops/niri.nix;
home = ../modules/home/desktops/niri.nix;
};
};- Add the output:
chapel-niri-noctalia = mkHost {
hostname = "chapel";
desktop = "niri";
theme = "noctalia";
};- Build it:
sudo nixos-rebuild switch --flake ~/nixos#chapel-niri-noctaliaTo add hyprland + caelestia:
-
Create
modules/home/themes/caelestia.nix. -
Register the theme in
flake/hosts.nix:
themes = {
noctalia = {
home = ../modules/home/themes/noctalia.nix;
};
caelestia = {
home = ../modules/home/themes/caelestia.nix;
};
};- Add the output:
chapel-hyprland-caelestia = mkHost {
hostname = "chapel";
desktop = "hyprland";
theme = "caelestia";
};- Build it:
sudo nixos-rebuild switch --flake ~/nixos#chapel-hyprland-caelestianix run .#nvfworks becausenvfis a package output.- NixOS systems are not run with
nix run; usenixos-rebuild --flake .#chapel. - Hyprland settings are Home Manager modules, not runnable apps.
- Lucidglyph is imported by Chapel and contributes fontconfig snippets plus Freetype environment variables.
This refactor lives on testing until it is proven on the machine.
git status --short --branch
nix flake check
sudo nixos-rebuild test --flake .#chapel
git commit -m "Describe the change"
git push github testing