Skip to content
dinoocchPublic

About

Nix configs -- I have no idea what I'm doing.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

164 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

❄️ Just another nix config repo ❄️

I have no idea what I am doing :)

Structure

This flake follows the dendritic pattern: every .nix file under modules/ and hosts/ (except paths starting with _) is automatically imported as a top-level flake-parts module via import-tree. flake.nix is the only entry point.

  • modules/moduleOptions.nix declares two merge points:
    • nixos.modules.<name> — named, mergeable NixOS modules
    • homeManager.modules.<name> — named, mergeable home-manager modules
  • modules/nixos/*.nix and modules/home/*.nix each contribute to a named bucket: base (universal settings/host-specific toggles), desktop (GUI-only features, gated on dino.gui.enable), or server (server-only features, gated on dino.server.enable). Every host currently composes base + desktop + server (identical to the old everything-in-base behavior), but the split allows a host to later opt out of a bucket it never needs (e.g. a headless server skipping desktop). Fine-grained gating within each file is still done via the dino.* options declared in modules/_lib/dinoOptions.nix.
  • modules/colmena.nix declares colmena.hosts.<name> and assembles flake.colmena from it.
  • modules/nixosConfigurations.nix declares nixos.hosts.<name> and assembles flake.nixosConfigurations from it, centralizing the _lib/nixosSystem.nix call so host files only declare which modules to compose, not how to build a nixosSystem.
  • modules/specialArgs.nix declares meta.{username,userfullname,useremail, linuxSpecialArgs} — flake-wide identity/specialArgs shared by every Linux host. This is a deliberately distinct namespace from the nested dino.* feature-toggle options (declared in modules/_lib/dinoOptions.nix), which live inside separate NixOS/home-manager evaluations.
  • hosts/<host>/default.nix declares host-specific NixOS settings under nixos.modules.<host>, and wires up nixos.hosts.<host> and/or colmena.hosts.<host> from nixos.modules.base + nixos.modules.desktop + nixos.modules.server + nixos.modules.<host>.
  • hosts/<host>/home.nix declares that host's home-manager overrides under homeManager.modules.<host>.
  • modules/_lib/ holds plain (non-flake-parts) helpers — nixosSystem.nix, colmenaSystem.nix and dinoOptions.nix — excluded from auto-import because their paths contain _. Files named _hardware-configuration.nix under hosts/ are excluded the same way, since they're plain NixOS hardware-scan output, not features to compose.

Work Mac

nh home switch . -c docchial builds and activates the work profile with a build-tree display and a generation diff. Rust tools, including the language server and formatter, follow dino.dev.rust.

Home Manager does not configure the system Nix daemon. Install hosts/work/nix.conf as a root-owned /etc/nix/work.conf, add include /etc/nix/work.conf to /etc/nix/nix.conf, and restart system/org.nixos.nix-daemon with launchctl while no builds are running. Reinstall that file and restart the daemon after changing it. It trusts the Nix Community cache without granting the user additional daemon privileges, and allows four concurrent builds with three cores each on the 12-core Mac. It also enables nix-command and flakes system-wide, including for commands that nh runs through sudo.

About

Nix configs -- I have no idea what I'm doing.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages