hypr,nvim,quickshell: make configs live-editable

Symlink three configs straight from the repo with mkOutOfStoreSymlink so
edits apply without a rebuild:

- home/hypr/hyprland.lua  -> reload with `hyprctl reload`
- home/hypr/quickshell/** -> restart quickshell
- home/nvim/config/**     -> next nvim start (lazy-lock.json now writable)

Hyprland's config was generated Lua; extract it to a hand-maintained file
and keep the palette and per-host monitors as generated fragments
(theme.lua / monitors.lua) loaded via dofile. The file also restores the
startup hook that imports the Wayland env into systemd and starts
graphical-session.target, which the removed home-manager hyprland module
used to provide.

Verified: lua syntax + execution against a stub hl, and flake check.
This commit is contained in:
2026-09-19 01:14:33 -07:00
parent 8010cea0bc
commit d1e243dd12
5 changed files with 374 additions and 575 deletions

View File

@@ -83,3 +83,29 @@ every home-manager module through `extraSpecialArgs`. Tools that only accept a
raw config file (starship, rofi, the herdr picker) carry `@color@` placeholders
that are substituted from the same palette at build time, so changing an accent
means editing one file.
## Editing configs: live vs generated
Most configs are generated from Nix and symlinked read-only from the store, so
they need a `rebuild switch` to change:
- `foot.ini`, `hyprlock.conf`, `hypridle.conf`, `mako/config`, `starship.toml`,
`rofi/config.rasi`, `.zshenv`/`.zshrc` (Nix attrs, themed)
Three configs are instead symlinked **straight from the repo** with
`mkOutOfStoreSymlink`, so edits apply without a rebuild:
| Live file | Applies on |
| --- | --- |
| `home/hypr/hyprland.lua` | `hyprctl reload` |
| `home/hypr/quickshell/**` | quickshell restart |
| `home/nvim/config/**` (incl. `lazy-lock.json`) | next nvim start; `:Lazy update` writes here |
Because `hyprland.lua` is live, the palette and per-host monitors are emitted as
generated fragments, `~/.config/hypr/theme.lua` and
`~/.config/hypr/monitors.lua`, which the live file loads with `dofile`. Edit the
Lua directly for anything else.
The tradeoff: live files are not part of the Nix closure, so the repo must exist
at `my.flakeDir` for the symlinks to resolve, and uncommitted edits can drift
from git. Keep them committed like any other tracked file.