Skip to content

cschmatzler/nixos-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

916 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NixOS Config

Personal Nix flake for two machines:

  • tahani - x86_64 Linux home server / workstation
  • janet - aarch64 Darwin personal laptop

Repository Map

  • modules/ - flake-parts modules, auto-imported via import-tree
  • modules/hosts/ - per-host composition modules
  • modules/hosts/_parts/ - host-private leaf modules like hardware, disks, and literal networking
  • modules/profiles/ - shared host and user profile bundles
  • modules/_lib/ - local helper functions
  • modules/_desktop/, modules/_opencode/, modules/_terminal/, modules/_tmux/ - feature-owned config data, templates, and rendered config sources
  • apps/ - shell apps exposed through the flake
  • secrets/ - SOPS-encrypted secrets
  • flake.nix - generated flake entrypoint
  • modules/dendritic.nix - source of truth for flake inputs and flake.nix generation

How It Is Structured

This repo uses den and organizes configuration around aspects instead of putting everything directly in host files.

  • shared behavior lives in den.aspects.<name>.<class> modules under modules/*.nix
  • the machine inventory lives in modules/inventory.nix
  • shared bundles live in modules/profiles/{host,user}/
  • host composition happens in modules/hosts/<host>.nix
  • host-private imports live in modules/hosts/_parts/<host>/ and stay limited to true machine leaf files
  • feature-owned services and user config live in top-level modules like modules/ai-tools.nix and modules/network.nix
  • large app config payloads live next to their feature under _-prefixed directories and get rendered from Nix data instead of mixing inline JSON/text blobs and checked-in generated files
  • user-level config mostly lives in Home Manager aspects

Common examples:

  • modules/core.nix - shared Nix and shell foundation
  • modules/dev-tools.nix - VCS, language, and developer tooling
  • modules/network.nix - SSH and tailscale aspects
  • modules/ai-tools.nix - OpenCode, MCP, and agent configuration
  • modules/profiles/user/workstation.nix - shared developer workstation user bundle
  • modules/hosts/tahani.nix - server/workstation composition for tahani

Common Commands

nix run .#build
nix run .#build -- tahani
nix run .#apply
nix flake check
alejandra .

Updating The Flake

flake.nix is generated. Update inputs in modules/dendritic.nix, then regenerate:

nix run .#write-flake
alejandra .

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors