modules: scaffold desktop-env (niri + greetd + fonts + DMS bridge) (ADR-028 slice 3b)#44
Merged
Merged
Conversation
dannyfaris
enabled auto-merge (squash)
May 28, 2026 09:44
…DR-028 slice 3b) Four standalone modules + a pure-aggregation bundle for hosts running a Wayland desktop session. Pure-aggregation per PRD §8.1 #4 (bundle-purity rule): bundles contain only an `imports` list, no inline option setting. Standalone modules added: - niri.nix — imports niri-flake's nixosModule (package + polkit + dconf + OpenGL + xdg.portal + wayland-sessions/niri.desktop entry) and enables programs.niri. Opts out of niri-flake's default-true cachix substituter (`niri-flake.cache.enable = false`) per CLAUDE.md's whitelist > blanket stance — trust delegations should be deliberate. Cost: niri rebuilds from source on every niri-flake bump (~10-30 min on metis-class hardware). The repo may run its own niri cache later rather than re-enabling the upstream one. - greetd.nix — services.greetd with tuigreet (`--time --remember --remember-session --asterisks`) on tty1 (greetd's hardcoded VT — upstream removed the per-host vt option with the message "The VT is now fixed to VT1"). Break-glass remains kernel TTYs 2-6 via Ctrl-Alt-F2..F6, preserving CLAUDE.md's physical-console posture. useTextGreeter = true so kernel/systemd messages don't paint over the tuigreet UI during cold boot. Uses pkgs.tuigreet directly (the pkgs.greetd.tuigreet alias is deprecated upstream). - desktop-fonts.nix — stylix.fonts.sansSerif = Inter; stylix.fonts.emoji = Noto Color Emoji. Foundation already sets monospace (JetBrains Mono Nerd Font); these two are desktop-only so headless hosts don't carry the ~50 MB font closure. - dms-home-bridge.nix — home-manager.sharedModules injects DMS's two HM modules (homeModules.dank-material-shell + homeModules.niri). modules/core/nixos/home-manager.nix forwards only hostContext via extraSpecialArgs; sharedModules is the existing NixOS-side mechanism for adding HM modules without expanding the args contract. bundles/desktop-env.nix — pure aggregation; imports the four above. No host imports the bundle yet (slice 3d will). Verified: every file parses; `nix build .#nixosConfigurations.metis...` succeeds (closure unchanged because bundle is dormant); peer-reviewed against twelve upstream-correctness and convention-compliance points. Per ADR-028 §Implementation slice 3.
dannyfaris
force-pushed
the
desktop-env/02-system-bundle
branch
from
May 28, 2026 10:15
3cba7fc to
378e152
Compare
5 tasks
This was referenced May 28, 2026
dannyfaris
added a commit
that referenced
this pull request
May 28, 2026
First commit that imports the slice-3 desktop bundles into a real host. Two-line addition to hosts/metis/default.nix: - modules/core/nixos/bundles/desktop-env.nix added to `imports` (alongside bundles/remote-access.nix). - home/core/nixos/bundles/desktop-env.nix added to hostContext.extraHomeModules (after the shared theming bundle, before standalones). This is the integration test for the four merged slice-3 PRs: - #42 (3a) — flake inputs - #44 (3b) — system bundle scaffold (niri + greetd + fonts + DMS bridge) - #55 (3c) — home bundle scaffold (niri binds + foot + DMS) - #57 (3b.5) — niri.cachix.org substituter in nix.settings …plus the CI-side half currently in flight at #59 (extra_nix_config in flake-check workflow). This branch is stacked on desktop-env/ci-niri-cache-trust so the CI workflow trust is in place when CI evaluates this PR. Closure delta on metis (expected): niri (from niri.cachix.org), greetd + tuigreet, Quickshell + Qt6 + matugen + DMS deps, xdg-desktop-portal-gnome, polkit-kde-agent-1, gnome-keyring, Inter, Noto Color Emoji, foot. No regression expected on mercury or nixos-vm — neither imports the bundles. Local build verification not possible — dbf is not in nix's trusted-users, so runtime substituter additions are rejected. The integration test fires in CI where the GH Actions runner is trusted and the workflow already declares extra-substituters via #59 (which this branch inherits). No `nh os switch` here; that's slice 5. Peer-reviewed (8 checkpoints: bundle placement, no auto-discovery, closure delta sanity, eval-without-cache, CI matrix arch scoping, CI ordering / branch base, merge-order safety, edge cases including HM module order, Stylix font conflicts, pre-commit hooks). Per ADR-028 §Implementation slice 3.
5 tasks
dannyfaris
added a commit
that referenced
this pull request
May 28, 2026
First commit that imports the slice-3 desktop bundles into a real host. Two-line addition to hosts/metis/default.nix: - modules/core/nixos/bundles/desktop-env.nix added to `imports` (alongside bundles/remote-access.nix). - home/core/nixos/bundles/desktop-env.nix added to hostContext.extraHomeModules (after the shared theming bundle, before standalones). This is the integration test for the four merged slice-3 PRs: - #42 (3a) — flake inputs - #44 (3b) — system bundle scaffold (niri + greetd + fonts + DMS bridge) - #55 (3c) — home bundle scaffold (niri binds + foot + DMS) - #57 (3b.5) — niri.cachix.org substituter in nix.settings …plus the CI-side half currently in flight at #59 (extra_nix_config in flake-check workflow). This branch is stacked on desktop-env/ci-niri-cache-trust so the CI workflow trust is in place when CI evaluates this PR. Closure delta on metis (expected): niri (from niri.cachix.org), greetd + tuigreet, Quickshell + Qt6 + matugen + DMS deps, xdg-desktop-portal-gnome, polkit-kde-agent-1, gnome-keyring, Inter, Noto Color Emoji, foot. No regression expected on mercury or nixos-vm — neither imports the bundles. Local build verification not possible — dbf is not in nix's trusted-users, so runtime substituter additions are rejected. The integration test fires in CI where the GH Actions runner is trusted and the workflow already declares extra-substituters via #59 (which this branch inherits). No `nh os switch` here; that's slice 5. Peer-reviewed (8 checkpoints: bundle placement, no auto-discovery, closure delta sanity, eval-without-cache, CI matrix arch scoping, CI ordering / branch base, merge-order safety, edge cases including HM module order, Stylix font conflicts, pre-commit hooks). Per ADR-028 §Implementation slice 3.
This was referenced May 28, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Four standalone modules + a pure-aggregation bundle for hosts running a Wayland desktop session. Per PRD §8.1 #4 (bundle-purity rule): bundles contain only an
importslist, no inline option setting. The capabilities of the desktop-env bundle live in standalone siblings.Standalone modules:
niri.nix— imports niri-flake's nixosModule (package + polkit + dconf + OpenGL + xdg.portal + thewayland-sessions/niri.desktopentry that greetd discovers) and enablesprograms.niri. Opts out of niri-flake's default-true cachix substituter (niri-flake.cache.enable = false) per CLAUDE.md's whitelist > blanket stance — trust delegations should be deliberate. Cost: niri rebuilds from source on every niri-flake bump (~10–30 min on metis-class hardware). The repo may run its own niri cache later rather than re-enabling the upstream one.greetd.nix—services.greetdwith tuigreet (--time --remember --remember-session --asterisks) on tty1 (greetd's hardcoded VT — upstream removed the per-hostvtoption). Break-glass remains kernel TTYs 2–6 via Ctrl-Alt-F2..F6, preserving CLAUDE.md's physical-console posture.useTextGreeter = trueso kernel/systemd messages don't paint over tuigreet during cold boot. Usespkgs.tuigreetdirectly (thepkgs.greetd.tuigreetalias is deprecated upstream).desktop-fonts.nix—stylix.fonts.sansSerif = Inter;stylix.fonts.emoji = Noto Color Emoji. Foundation already sets monospace; these two are desktop-only so headless hosts don't carry the closure.dms-home-bridge.nix— injects DMS's two HM modules (homeModules.dank-material-shell+homeModules.niri) viahome-manager.sharedModules. The HM wrapper forwards onlyhostContext;sharedModulesis the existing mechanism for adding HM modules without expanding the args contract.Bundle:
bundles/desktop-env.nix— pure aggregation; imports the four above.No host imports the bundle yet — slice 3d (#33) does that. Closure unchanged because the bundle is dormant.
Peer review
This PR went through subagent peer-review on the staged diff against twelve correctness/convention checkpoints. The first attempt (configuration-direct monolithic bundle) was caught at peer-review with two blocking findings (
services.greetd.vt = 7removed upstream;pkgs.greetd.tuigreetdeprecated) plus the bundle-purity architectural deviation; this refactor addresses all three.Test plan
nix-instantiate --parse).nix build .#nixosConfigurations.metis.config.system.build.toplevel --no-linksucceeds.Refs: #33 (ADR-028 slice 3 tracker), ADR-028.
🤖 Generated with Claude Code