refactor(nixos): scope agent guidance

This commit was merged in pull request #199.
This commit is contained in:
2026-10-20 04:40:14 -04:00
parent c836396cbe
commit 7186d6a3a7
6 changed files with 189 additions and 70 deletions

View File

@@ -0,0 +1,43 @@
## Register window icons
### Rule
Each graphical application has a `registry.window-icon` entry with a window-class match and rendered icon.
### Rationale
Hyprland uses this registry to render workspace icons for open application windows.
Run this command to list window classes from the running compositor:
```bash
hyprctl clients -j | jq -r '.[].class' | sort -u
```
## Separate guest wrappers from service modules
### Rule
Each guest module wraps one service module.
The guest enables its service through `guests.<name>.interior`.
Service modules own service configuration.
Guest modules configure bind mounts, secret delivery, resource limits, and registry entries.
Host configuration supplies deployment-specific paths, volumes, addresses, and routes.
### Rationale
Service modules support a service without guest infrastructure.
Guest modules adapt a service module to a guest.
Host configuration provides deployment-specific values.
## Decrypt guest secrets on the host
### Rule
A host user owns each guest secret before SOPS decrypts it.
Each guest service group accesses its secrets through a read-only bind mount.
### Rationale
Guest service accounts do not exist on the host, where SOPS creates secrets.
The shared service group preserves read access across the guest boundary.

View File

@@ -22,6 +22,17 @@ Do not call `lib.removeSuffix ".nix"` outside the utility definition.
The utility centralizes Nix file-name normalization.
## Qualify library functions
### Rule
Keep library functions qualified as `lib.<function>`.
### Rationale
Qualification makes library ownership explicit.
It prevents local namespace collisions.
## Use executable helpers for package commands
### Rule