feature(niri): configure niri via home-manager's niri module #82

Merged
aaron merged 2 commits from feature/niri-hm into main 2026-10-02 08:37:32 +02:00
Owner

Closes #67

Moves the hand-edited ~/.config/niri/config.kdl into home-manager's built-in wayland.windowManager.niri module.

Changes

  • modules/home-manager/niri.nix: shared config (input, layout, window rules, binds) via settings. Only renders the config: niri itself, the session, systemd units and portals stay with the NixOS module (modules/nixos/niri.nix). Uses osConfig.programs.niri.package so niri validate runs at build time against the installed version, and is only enabled on hosts with programs.niri.enable.
  • hosts/argon/niri.nix: DP-1/DP-2 output layout, touchpad/trackpoint off.
  • hosts/neon/niri.nix: touchpad tap + natural-scroll, gaps 10, Print/Ctrl+Print screenshots, Mod+Shift+P power-off-monitors, 1% brightness steps (lib.mkForce, since spawn lists would otherwise be concatenated).
  • Argon's config is the shared baseline; neon's older divergences (focus-monitor binds, animation slowdown, wezterm/Secrets rules, …) were dropped.

Testing

  • Generated configs pass niri validate for argon and neon; argon's 108 binds match the previous hand-written config.
  • nh os test on both hosts: niri reloaded the symlinked config without errors.
  • nixfmt and statix clean.

Note: the existing config.kdl must be moved away before the first activation (no backupFileExtension set).

🤖 Generated with Claude Code

Closes #67 Moves the hand-edited `~/.config/niri/config.kdl` into home-manager's built-in `wayland.windowManager.niri` module. ## Changes - `modules/home-manager/niri.nix`: shared config (input, layout, window rules, binds) via `settings`. Only renders the config: niri itself, the session, systemd units and portals stay with the NixOS module (`modules/nixos/niri.nix`). Uses `osConfig.programs.niri.package` so `niri validate` runs at build time against the installed version, and is only enabled on hosts with `programs.niri.enable`. - `hosts/argon/niri.nix`: DP-1/DP-2 output layout, touchpad/trackpoint off. - `hosts/neon/niri.nix`: touchpad tap + natural-scroll, gaps 10, Print/Ctrl+Print screenshots, `Mod+Shift+P` power-off-monitors, 1% brightness steps (`lib.mkForce`, since `spawn` lists would otherwise be concatenated). - Argon's config is the shared baseline; neon's older divergences (focus-monitor binds, animation slowdown, wezterm/Secrets rules, …) were dropped. ## Testing - Generated configs pass `niri validate` for argon and neon; argon's 108 binds match the previous hand-written config. - `nh os test` on both hosts: niri reloaded the symlinked config without errors. - nixfmt and statix clean. Note: the existing `config.kdl` must be moved away before the first activation (no `backupFileExtension` set). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
aaron added 1 commit 2026-10-01 20:02:18 +02:00
aaron added 1 commit 2026-10-02 08:23:35 +02:00
aaron merged commit 99a910265f into main 2026-10-02 08:37:32 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: aaron/nixconfig#82