refactor(ssh): restructure inventory and modularize helper logic

Relocate SSH inventory and rbw socket wiring from `modules/lib/` to
dedicated `modules/ssh/` modules to improve logical grouping.

- Move `ssh-inventory.nix` to `modules/ssh/inventory.nix`.
- Move `rbw-ssh-socket.nix` to `modules/ssh/rbw.nix`.
- Relocate `users-merge.nix` logic into `modules/system/users.nix` to
  reduce dependency on generic library modules.
- Update `docs/conventions.md` to reflect new module paths.
- Refactor `modules/deploy/navi.nix` to use a local helper for
  generating Navi hive configurations.
- Add Pi5 specific Niri KDL configuration snippets.
This commit is contained in:
2026-07-15 23:27:03 -03:00
parent a787840ce2
commit c90d368432
13 changed files with 314 additions and 293 deletions
+39
View File
@@ -0,0 +1,39 @@
# Pi5 + DSI DRM KDL snippets (`desktop.niri.raspberryPi5DrmWorkaround`) — lives in `flake.lib`.
{ ... }:
let
drmExtraConfig = ''
debug {
render-drm-device "/dev/dri/renderD128"
ignore-drm-device "/dev/dri/card1"
ignore-drm-device "/dev/dri/card2"
}
'';
in
{
flake.lib.pi5NiriKdl = {
inherit drmExtraConfig;
# Keep in sync with DMS greeter niri template when upstream edits it.
dankGreeterCompositorConfig = ''
hotkey-overlay {
skip-at-startup
}
environment {
DMS_RUN_GREETER "1"
}
${drmExtraConfig}
gestures {
hot-corners {
off
}
}
layout {
background-color "#000000"
}
'';
};
}
+16 -1
View File
@@ -1,4 +1,19 @@
{ ... }: {
{ lib, ... }: {
# Resolve `wisdom*` HM slices for NixOS `extraModules` (`self` is not an HM specialArg).
# Slices are gated by `chiasson.home.*.enable`; hosts only flip toggles in `home.nix`.
# Lives here (not `modules/lib/`) because `hosts/desktop-home-base.nix` consumes it and
# fragment eval order requires the definition to sort before `hosts/`.
flake.lib.wisdomCatalogExtraModules =
self:
let
names = lib.sort builtins.lessThan (
lib.filter (n: lib.hasPrefix "wisdom" n && n != "wisdom" && n != "wisdomShellBash") (
builtins.attrNames self.homeManagerModules
)
);
in
map (name: self.homeManagerModules.${name}) names;
flake.nixosModules.desktopOptions =
{ config, options, lib, pkgs, self, inputs, ... }:
let