clean up & hyprland experiments

- Cleaned up docs
- removed hyprglass
- added various ways to do scroll view
This commit is contained in:
ari committed 2026-08-28 12:58:27 -04:00
1 parent c304803fda
commit 3c86efa4ff
23 files changed
+443 -212

No files matched your search

+4 -1
View File
@@ -69,6 +69,8 @@ breaks the composition model.
You must **live and die by these rules** and hold yourself accountable to them.
These are not suggestions — they are non-negotiable.
### KEEP EVERYTHING CONCISE, shorter concise comments are preferable, less jargon and more common words.
---
## Safe Operations
@@ -79,6 +81,7 @@ These are always safe to perform without asking:
- Editing host files (`hosts/<hostname>.nix`) to add/remove packages or options
- Editing module files in `modules/`
- `ABOUTME.md` should be seen as the 'living memory' of a folder, it should contain general information about what's in the folder and capture decisions made at the time of development the features.
- **Keep ABOUTME.md current:** whenever you add, remove, or rename files, options, commands, or behaviour in a folder, check that folder's `ABOUTME.md` still matches reality and update it as part of the same change. If you discover an existing `ABOUTME.md` that is stale (dead file/option/command references, missing entries, wrong paths), fix it in the same way.
- Adding new packages to `pkgs/`
- Editing configs in `configs/`
@@ -86,7 +89,7 @@ These are always safe to perform without asking:
## When In Doubt
If you are unsure whether a command is safe, **assume it is not safe and don't run it.**
If you are unsure whether a command is safe, **assume it is NOT SAFE and don't run it.**
Instead: describe what you would do and ask the user for permission.
+1 -1
View File
@@ -143,7 +143,7 @@ Secrets are encrypted using [agenix](https://github.com/ryantm/agenix) and store
1. **Get the host's SSH public key**: `cat /etc/ssh/ssh_host_ed25519_key.pub`
2. **Add to `secrets.nix`**: Create a variable with the key and add it to each secret's `publicKeys` list
3. **Re-key**: Run `skyg secrets rekey` to re-encrypt the `.age` files
3. **Re-encrypt**: for each affected secret run `skyg decrypt <name>` then `skyg encrypt <name>` to re-encrypt it against the updated key set
For more details, see `secrets/ABOUTME.md`.
+13 -1
View File
@@ -6,7 +6,10 @@ The `skyg` CLI — the single entry point for all system management tasks in thi
```
bin/
├── skyg # Bash shim: exec nu --commands "use lib/cmds.nu *; skyg $*"
├── skyg # Bash shim: exec nu --commands "use lib/cmds.nu *; skyg $*"
├── check-flake-versions # Bash shim for `skyg check-flake-versions`
├── temp-monitor # NuShell script: collect CPU/GPU temps to CSV + optional graph
├── TEMP_MONITOR_README.md # Usage docs for temp-monitor
└── lib/
├── cmds.nu # All subcommand implementations (NuShell — source of truth)
├── profile.nu # Profile helpers and tab-completion data
@@ -24,6 +27,15 @@ bin/
| `skyg build-iso` | Build bootable ISO |
| `skyg openwrt` | Deploy OpenWrt config |
| `skyg rollback` | Roll back to previous generation |
| `skyg profiles` | List valid local/remote profiles |
| `skyg check` | Run `nix flake check --no-build` |
| `skyg check-flake-versions` | Verify NixOS release version consistency in flake.nix |
| `skyg remote boot-all` | Boot all remote hosts (builds on `fwdesk`) |
| `skyg remote status` | Check status of all remote hosts |
| `skyg secrets` | List known secret names |
| `skyg decrypt <secret>` | Decrypt a secret to `.tmp/unencrypted-<secret>` |
| `skyg encrypt <secret> [--yaml]` | Encrypt a working copy back into the secret |
| `skyg compare-secret <secret>` | Diff the working copy against the stored secret |
## Agent Note
+29 -13
View File
@@ -32,11 +32,20 @@ split under `conf/` and pulled in with `require()`.
inside quickshell-based apps fail silently (hyprwm/Hyprland#14844). There is
intentionally no waybar/hyprpanel.
- **Keybinds:** `conf/keybindings.lua` mirrors `configs/niri/shared/binds.kdl`
and `configs/niri/noctalia/binds.kdl` as closely as Hyprland allows.
- **Overview:** there is no native Hyprland overview, and no overview plugin that
reliably builds against current Hyprland (hyprexpo was retired from the
official plugins repo; the community fork chases `main`). `Mod+Tab` falls back
to `cyclenext` instead of niri's `toggle-overview`.
and `configs/niri/dms/binds.kdl` as closely as Hyprland allows.
- **Overview:** Pure-Lua workspace overview (`conf/overview.lua`), no plugin. It
enumerates workspaces via `hl.get_workspaces()` and presents them in a
`wofi --dmenu` picker, dispatching the chosen workspace with
`hyprctl dispatch workspace`. Hyprland's Lua API has no "render a workspace
to a texture" primitive, so this is a switcher-style overview (id, name,
window count, active/empty/urgent flags) rather than live scaled thumbnails.
Bound to `Mod+Tab` (niri parity) and `Mod+G`.
- **Overview (plugin, WIP):** ScrollOverview (`conf/scrolloverview.lua`), a
niri-like overview plugin (github.com/yayuuu/hyprland-scroll-overview), is
the live-thumbnail alternative. Currently **disabled** (commented out in
`hyprland.lua`) while it's being debugged; would load via `hl.plugin.load`
from the `SCROLLOVERVIEW_SO` session variable set in
`modules/nixos/desktop/tiler/hyprland.nix`.
## Files
@@ -44,20 +53,26 @@ split under `conf/` and pulled in with `require()`.
hypr/
├── hyprland.lua # entry point; require()s conf/*.lua in order
├── screen-record.sh # wf-recorder toggle (bound to Mod+R)
├── xdph.conf # xdph screencopy workaround (force_shm); hyprlang, read by xdph itself
├── stylua.toml # stylua formatter settings for the Lua files
├── .luarc.json # lua-language-server config (uses types/ as library)
├── dms/ # DMS-auto-generated Hyprland overrides (colors/layout/windowrules);
│ # not loaded by default — require() them from hyprland.lua to enable
├── types/
│ └── hl.lua # EmmyLua type stubs for the `hl` global (editor-only, never executed)
└── conf/
├── env.lua # cursor size + Wayland/Qt/Electron env hints (hl.env)
├── general.lua # scrolling layout, gaps/border/rounding (hl.config)
├── animations.lua # vertical workspace-switch animation (hl.animation)
├── animations.lua # vertical workspace slide (slidevert), niri-like (hl.animation):
`style = "slidevert"`) to mirror niri's vertically-stacked workspaces, instead of
Hyprland's default horizontal `slide`. Only the `workspaces` leaf is overridden;
everything else stays on Hyprland defaults. Other `workspaces` styles available:
`slide`, `fade`, `slidefade`, `slidefadevert`.
├── animations.lua # workspaces slide = "slidevert" (niri-like); only the `workspaces`
│ # leaf overridden — other styles: slide, fade, slidefade, slidefadevert
├── monitors.lua # hl.monitor per display (from configs/niri/.../outputs.kdl)
├── inputs.lua # touchpad tap + natural scroll, kb us, hl.gesture
├── window-rules.lua # hl.window_rule floats for small dialogs/utilities
├── keybindings.lua # niri + noctalia binds, scrolling dispatchers (hl.bind/hl.dsp)
└── autostart.lua # noctalia, hypridle via setpriv (hl.on hyprland.start; drops compositor caps)
├── autostart.lua # noctalia, hypridle via setpriv (hl.on hyprland.start; drops compositor caps)
├── overview.lua # pure-Lua workspace switcher overview (wofi picker, Mod+Tab/Mod+G)
└── scrolloverview.lua # ScrollOverview plugin (niri-like, live thumbnails) — WIP/disabled;
# loads via $SCROLLOVERVIEW_SO, require() commented out in hyprland.lua
```
## Bindings without a clean 1:1 niri mapping
@@ -65,7 +80,8 @@ everything else stays on Hyprland defaults. Other `workspaces` styles available:
- `Mod+Shift+H` (show-hotkey-overlay) — no native Hyprland equivalent; left commented.
- `Mod+Escape` (toggle-keyboard-shortcuts-inhibit) — no native equivalent; omitted.
- `Mod+W` (toggle-column-tabbed-display) — mapped to `hl.dsp.group.toggle()` as the nearest analog.
- `Mod+Tab` (toggle-overview) — no native overview / no buildable plugin; mapped to `cyclenext`.
- `Mod+Tab` (toggle-overview) — pure-Lua overview (`conf/overview.lua`);
previously the ScrollOverview plugin, and `cyclenext` before that existed.
## Touchpad gestures (niri parity)
-53
View File
@@ -1,53 +0,0 @@
-- =========================
-- Hyprgrass (Touchpad Gestures)
-- =========================
-- Hyprgrass plugin configuration for advanced touchpad gesture support.
-- Documentation: https://github.com/horriblename/hyprgrass
-- Config reference: docs/configuration.md
-- environment.systemPackages only puts libhyprgrass.so on disk -- Hyprland
-- doesn't load plugins on its own. HYPRGRASS_SO is set in
-- modules/nixos/desktop/tiler/hyprland.nix (sessionVariables) to the resolved
-- store path, since that path changes on every flake update. Must run before
-- anything below references plugin.hyprgrass config keys or hl.plugin.hyprgrass,
-- both of which only exist once the plugin is loaded.
hl.plugin.load(os.getenv("HYPRGRASS_SO"))
hl.config({
plugin = {
hyprgrass = {
-- The default sensitivity is probably too low on tablet screens,
-- I recommend turning it up to 4.0
sensitivity = 4.0,
-- in milliseconds
long_press_delay = 400,
-- resize windows by long-pressing on window borders and gaps.
resize_on_border_long_press = true,
-- in pixels, the distance from the edge that is considered an edge
edge_margin = 10,
},
},
})
-- =========================
-- Custom gesture bindings
-- =========================
-- -- -- 4-finger swipes to switch workspaces
hl.plugin.hyprgrass.gesture({
pattern = { kind = "swipe", fingers = 4, direction = "left" },
action = "workspace",
})
hl.plugin.hyprgrass.gesture({
pattern = { kind = "swipe", fingers = 4, direction = "right" },
action = "workspace",
})
-- 3-finger tap to toggle floating
hl.plugin.hyprgrass.bind({
pattern = { kind = "tap", fingers = 3 },
action = hl.dsp.window.float(),
})
+3 -2
View File
@@ -25,8 +25,9 @@ hl.bind(mod .. " + right", hl.dsp.focus({ direction = "right" }))
hl.bind(mod .. " + up", hl.dsp.focus({ workspace = "e-1" }))
hl.bind(mod .. " + down", hl.dsp.focus({ workspace = "e+1" }))
-- niri: toggle-overview — no native overview / no buildable plugin; cycle windows.
hl.bind(mod .. " + Tab", hl.dsp.window.cycle_next())
-- hl.bind(mod .. " + Tab", function()
-- hl.plugin.scrolloverview.overview("toggle all")
-- end)
-- niri: focus-monitor-next
hl.bind(mod .. " + SHIFT + Tab", hl.dsp.focus({ monitor = "+1" }))
+127
View File
@@ -0,0 +1,127 @@
-- =========================
-- Overview (pure Lua, wofi-driven)
-- =========================
-- A niri-style workspace overview built entirely from Hyprland's Lua API -- no
-- external plugin (.so). Because Hyprland's Lua API exposes no "render a
-- workspace to a texture" primitive, we can't draw live scaled thumbnails from
-- Lua alone. So this is the honest pure-Lua version: a workspace *switcher
-- overview* -- enumerate every workspace (id, name, window count, active/empty
-- state) with hl.get_workspaces(), present them in a wofi dmenu, and jump to
-- the one you pick.
--
-- Flow: the Lua side is the source of truth for the workspace list; it writes a
-- tiny picker script to /tmp and launches it with `sh <file>`. The script shows
-- wofi, extracts the leading workspace id from the chosen line, and dispatches
-- it with hyprctl.
--
-- Why the dispatch lives in the script (not in a Lua timer): a Lua keybind
-- callback runs on the compositor's main thread under a ~100ms watchdog, so it
-- can't block reading wofi's stdout, and an async poll-timer handoff (reading a
-- result file on a repeating hl.timer) proved fragile -- a dispatch error left
-- the poll timer leaked. Keeping the switch in the spawned shell is the simple,
-- robust path. The script is launched as `sh <file>` (not executed) so we never
-- need os.execute/chmod, which would also block the callback.
--
-- Bound to Mod+Tab (niri parity) and Mod+G. The old plugin-based
-- conf/scrolloverview.lua is left untouched and still commented out in
-- hyprland.lua.
local mod = "SUPER"
-- Where the generated picker script lives. /tmp is fine for a per-session
-- helper; it's rewritten on every toggle so it always reflects live state.
local script_path = "/tmp/hypr-overview.sh"
---Build the display lines fed to wofi.
---Each line starts with the numeric workspace id, which is what the picker
---dispatches on. Keeping the id first means we never have to round-trip a
---hidden selector column through wofi.
---@return string[] lines one human-readable label per workspace
local function workspace_lines()
local lines = {}
-- Stable ordering: numeric id ascending.
local ws = hl.get_workspaces() or {}
table.sort(ws, function(a, b)
return (a.id or 0) < (b.id or 0)
end)
for _, w in ipairs(ws) do
-- Skip special (scratchpad) workspaces; they aren't part of the tape.
if not w.special and w.id and w.id > 0 then
local name = (w.name and w.name ~= "") and w.name or ("workspace " .. w.id)
local count = w.windows or 0
local flags = {}
if w.active then
table.insert(flags, "active")
end
if count == 0 then
table.insert(flags, "empty")
end
if w.has_urgent then
table.insert(flags, "urgent")
end
local suffix = #flags > 0 and (" [" .. table.concat(flags, ", ") .. "]") or ""
-- Leading "<id>." is parsed back out by the picker; keep it first.
table.insert(
lines,
string.format("%d. %-24s %2d window(s)%s", w.id, name, count, suffix)
)
end
end
return lines
end
---Write the picker helper script. It feeds the display lines to wofi, extracts
---the leading workspace id from the chosen line, and dispatches it via hyprctl.
---@param lines string[]
---@return boolean ok
local function write_script(lines)
local f = io.open(script_path, "w")
if not f then
hl.print("overview: could not write", script_path)
return false
end
f:write("#!/bin/sh\n")
f:write("# Generated by conf/overview.lua -- do not edit by hand.\n")
-- No `set -e`: wofi exits non-zero on Escape/cancel; we just do nothing.
f:write("pick=$(cat <<'__DATA__' | wofi --dmenu --prompt 'Overview' --width 480 --lines 15)\n")
for _, line in ipairs(lines) do
-- Guard against a stray newline/heredoc terminator inside a name.
local safe = line:gsub("\n", " ")
f:write(safe .. "\n")
end
f:write("__DATA__\n")
f:write(")\n")
f:write('[ -z "$pick" ] && exit 0\n')
-- The chosen line begins with "<id>."; take the leading digits as the id.
f:write('id=$(printf %s "$pick" | cut -d. -f1 | tr -dc 0-9)\n')
f:write('[ -z "$id" ] && exit 0\n')
f:write('exec hyprctl dispatch workspace "$id"\n')
f:close()
return true
end
---Toggle the overview: regenerate the live workspace list and pop wofi.
---Writing a small file and spawning a process are both fast enough to run
---directly in the keybind callback (no blocking subprocess, no chmod).
local function show_overview()
local lines = workspace_lines()
if #lines == 0 then
return
end
if write_script(lines) then
hl.exec_cmd("sh " .. script_path)
end
end
-- Mod+Tab is niri's toggle-overview; Mod+G kept for muscle-memory parity with
-- the old scrolloverview bind.
hl.bind(mod .. " + Tab", show_overview)
hl.bind(mod .. " + g", show_overview)
@@ -0,0 +1,26 @@
-- =========================
-- ScrollOverview (niri-like overview)
-- =========================
-- ScrollOverview plugin: an overview just like niri's, based on the
-- scroll-overview branch of hyprexpo. Docs:
-- https://github.com/yayuuu/hyprland-scroll-overview
-- environment.systemPackages only puts libscrolloverview.so on disk -- Hyprland
-- doesn't load plugins on its own. SCROLLOVERVIEW_SO is set in
-- modules/nixos/desktop/tiler/hyprland.nix (sessionVariables) to the resolved
-- store path, since that path changes on every flake update. Must run before
-- anything below references plugin.scrolloverview config keys or
-- hl.plugin.scrolloverview, both of which only exist once the plugin is loaded.
hl.plugin.load(os.getenv("SCROLLOVERVIEW_SO"))
hl.config({
plugin = {
scrolloverview = {},
},
})
-- Toggle the overview with Mod+g (niri's toggle-overview lives on Mod+Tab in
-- conf/keybindings.lua, which now calls into this plugin too).
hl.bind("SUPER + g", function()
hl.plugin.scrolloverview.overview("toggle all")
end)
+2 -9
View File
@@ -1,14 +1,6 @@
-- =========================
-- Hyprland (fwbook)
-- =========================
-- Lua config (Hyprland 0.55+; hyprlang is deprecated). Mirrors the niri setup
-- in configs/niri, adapted to Hyprland's native scrolling layout + the noctalia
-- shell. This directory is symlinked to ~/.config/hypr by the skyg hyprland
-- module (skyg.nixos.desktop.tiler.hyprland), defaulting to
-- configs/${hostName}/hypr.
--
-- Split across conf/*.lua and pulled in with require(). The folder is named
-- `conf` (not `hyprland.d`) because require() treats `.` as a path separator.
require("conf/env")
require("conf/general")
@@ -18,4 +10,5 @@ require("conf/inputs")
require("conf/window-rules")
require("conf/keybindings")
require("conf/autostart")
require("conf/hyprgrass")
-- require("conf/overview")
require("conf/scrolloverview")
+62 -22
View File
@@ -28,8 +28,9 @@
---@class hl.dsp.FocusOpts
---@field direction? "left"|"right"|"up"|"down" Focus by direction
---@field workspace? string e.g. "e-1", "e+1", integer
---@field workspace? string|integer e.g. "e-1", "e+1", or a numeric id
---@field monitor? string e.g. "+1", "-1", name
---@field on_current_monitor? boolean Switch to the workspace on the current monitor
---@class hl.dsp.MoveOpts
---@field direction? "left"|"right"|"up"|"down"
@@ -141,8 +142,8 @@ dsp.workspace = dsp_workspace
---@field repeating? boolean Fire repeatedly while held (note: key is `repeating`, not `repeat`)
---Register a keybind. Returns a handle with a `:set_enabled(bool)` method.
---@param keys string Modifier + key string, e.g. "SUPER + T"
---@param action hl.DispatcherValue Return value of an hl.dsp.* factory
---@param keys string Modifier + key string, e.g. "SUPER + T"
---@param action hl.DispatcherValue | fun() An hl.dsp.* factory result, or a Lua callback
---@param opts? hl.BindOpts
---@return hl.BindHandle
function hl.bind(keys, action, opts) end
@@ -350,32 +351,71 @@ local plugin = {}
---Load a Hyprland plugin from its .so path.
---@param path string Absolute path to the shared library
function plugin.load(path) end
-- ---------------------------------------------------------------------------
-- hl.get_workspaces — runtime introspection
-- ---------------------------------------------------------------------------
---@class hl.plugin.hyprgrass
local plugin_hyprgrass = {}
---@class HL.Monitor
---@field id integer
---@field name string
---@field description? string
---@field width? integer
---@field height? integer
---@field x? integer
---@field y? integer
---@field scale? number
---@field focused? boolean
---@field active_workspace? HL.Workspace
---@class hl.HyprGrassPattern
---@field kind "swipe"|"tap"|"pinch"
---@field fingers number
---@field direction? "left"|"right"|"up"|"down"
---@class HL.Workspace
---@field id integer
---@field name string
---@field config_name? string Config-specified name (empty/absent for auto)
---@field windows? integer Number of windows on the workspace
---@field special? boolean Is a special (scratchpad) workspace
---@field active? boolean Is active on its monitor
---@field visible? boolean
---@field has_urgent? boolean
---@field is_empty? boolean
---@field monitor? HL.Monitor
---@class hl.HyprGrassGestureOpts
---@field pattern hl.HyprGrassPattern
---@field action string|hl.DispatcherValue
---All non-inert workspaces.
---@return HL.Workspace[]
function hl.get_workspaces() end
---@class hl.HyprGrassBindOpts
---@field pattern hl.HyprGrassPattern
---@field action hl.DispatcherValue
-- ---------------------------------------------------------------------------
-- hl.print — log to the Hyprland log
-- ---------------------------------------------------------------------------
---Register a hyprgrass gesture.
---@param opts hl.HyprGrassGestureOpts
function plugin_hyprgrass.gesture(opts) end
---@param ... any
function hl.print(...) end
---Register a hyprgrass tap/press bind.
---@param opts hl.HyprGrassBindOpts
function plugin_hyprgrass.bind(opts) end
-- ---------------------------------------------------------------------------
-- hl.dispatch — execute a dispatcher closure now
-- ---------------------------------------------------------------------------
plugin.hyprgrass = plugin_hyprgrass
---Run a dispatcher closure immediately (same as firing a bound key's action).
---@param action hl.DispatcherValue
function hl.dispatch(action) end
-- ---------------------------------------------------------------------------
-- hl.timer — deferred / repeating callbacks
-- ---------------------------------------------------------------------------
---@class hl.TimerOpts
---@field timeout number Interval / delay in milliseconds
---@field type? "repeat"|"oneshot"
---@class hl.TimerHandle
local TimerHandle = {}
---Cancel this timer.
function TimerHandle:cancel() end
---Schedule a callback on a repeating or one-shot timer.
---@param callback fun()
---@param opts hl.TimerOpts
---@return hl.TimerHandle
function hl.timer(callback, opts) end
-- ---------------------------------------------------------------------------
-- Global `hl` declaration
Generated
+101 -66
View File
@@ -41,11 +41,11 @@
]
},
"locked": {
"lastModified": 1785330427,
"narHash": "sha256-RTKedehLwWxGblFY5Nop3T08EGKH1T+4zmDTddmZ8k4=",
"lastModified": 1787574976,
"narHash": "sha256-8Egg3kenaiXNS4NNCI6ptJpwr4du00I5UCdmwGMvShg=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "fc39af0ccec9171aec8185eaea8afb71a46eff90",
"rev": "cf056dcfefc5282133928b81dcaf1993d33c4ea3",
"type": "github"
},
"original": {
@@ -453,6 +453,27 @@
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"scrolloverview",
"nixpkgs"
]
},
"locked": {
"lastModified": 1782949081,
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": [
"stylix",
@@ -692,11 +713,11 @@
]
},
"locked": {
"lastModified": 1776511930,
"narHash": "sha256-fCpwFiTW0rT7oKJqr3cqHMnkwypSwQKpbtUEtxdkgrM=",
"lastModified": 1786464181,
"narHash": "sha256-2alOMkLjXANh7unkZnYnCF2K2rApZaOLMoQ3o+VX2CY=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "39435900785d0c560c6ae8777d29f28617d031ef",
"rev": "e4ed7c08123df5af460a0a70961380cbfb872f76",
"type": "github"
},
"original": {
@@ -721,11 +742,11 @@
]
},
"locked": {
"lastModified": 1782566056,
"narHash": "sha256-haEZcHzYrePnjFOYSWTbxm/Nrla0aPslJfmvdCvqtVc=",
"lastModified": 1786464367,
"narHash": "sha256-k58p4wbzIXWyRWrW84pP8tD+iaZSSYiiM+fr0Auk4oU=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "c6e7b9f673f4360bc813d3dc75028f75ee88d3f8",
"rev": "7c895c44e3ca6d28ed68ddd80ec02b02b925e7fc",
"type": "github"
},
"original": {
@@ -763,31 +784,6 @@
"type": "github"
}
},
"hyprgrass": {
"inputs": {
"hyprland": [
"hyprland"
],
"nixpkgs": [
"hyprgrass",
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1786646554,
"narHash": "sha256-WNayKYvQl3MGPx61UX7y5n9zxvC+MgwRDwql7uwHriQ=",
"owner": "horriblename",
"repo": "hyprgrass",
"rev": "56473e9e0b2da34bb3b871e90f40b3fc3d41ba9b",
"type": "github"
},
"original": {
"owner": "horriblename",
"repo": "hyprgrass",
"type": "github"
}
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
@@ -805,11 +801,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1785600170,
"narHash": "sha256-FUYhESvUq9i4/VtGGr75w3nb3LA8qPKXG4Vs7+IjYD0=",
"lastModified": 1787916700,
"narHash": "sha256-DJYi+CVwbJlV9alS7RHIzkkCNBgBDJeXoAk5hIDDhRk=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "88c6386994c960006e14c7bfa4ccfee873252882",
"rev": "62b40e1d04f5b5d6c045d3cb4feb47a6de8507ea",
"type": "github"
},
"original": {
@@ -851,11 +847,11 @@
]
},
"locked": {
"lastModified": 1784533903,
"narHash": "sha256-Ee78BRFi+MrmgHmmW+2dZUEI1R3cssEzza0ar3fsNX8=",
"lastModified": 1786464504,
"narHash": "sha256-7sHwM86KILQyHDHDuE2SDBlQ2jvZ0EW3hY7sW009/cg=",
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"rev": "a16ad89ed5fb4192c966018a80c652de8d96f748",
"rev": "4c30cf3097ea963c0e250749ee0c59f8b08816d6",
"type": "github"
},
"original": {
@@ -905,11 +901,11 @@
]
},
"locked": {
"lastModified": 1777320127,
"narHash": "sha256-Qu+Wf2Bp5qUjyn2YpZNq8a7JyzTGowhT1knrwE38a9U=",
"lastModified": 1786464129,
"narHash": "sha256-339AkTlpMYSIvFuG0rnR+8Yg4/AZKeJalshJavlnKfg=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "090117506ddc3d7f26e650ff344d378c2ec329cc",
"rev": "9508458be316a0d70d37ebed1ab725ccd10411ff",
"type": "github"
},
"original": {
@@ -1044,11 +1040,11 @@
]
},
"locked": {
"lastModified": 1782554491,
"narHash": "sha256-+p3MlyN/nqRefcf2IckPlGRUn9+hielqpS9XClbLleM=",
"lastModified": 1785930473,
"narHash": "sha256-DitTu625BhEYpZjtjxtGpjrEJwPwW+X/+jJvhSZNSJM=",
"owner": "hyprwm",
"repo": "hyprtoolkit",
"rev": "bdba25ced39ea39ab004a8f31593ba0b0ff1ca35",
"rev": "af515b69dfbe366dc7873aa1475cb2f4db3ebad7",
"type": "github"
},
"original": {
@@ -1111,11 +1107,11 @@
]
},
"locked": {
"lastModified": 1784458610,
"narHash": "sha256-A9Gb5wW2vMkYEec7DyCOBpEM6LwwpmQ/TIXEHhGgHUY=",
"lastModified": 1786903207,
"narHash": "sha256-QTwMqLLONRhv9iz6CVeuX6BqQNQCIqI8hL/cPYlR/24=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "83da5ee98d806cef2d05a1072b8d8b832bf52891",
"rev": "6cf50415e06dc6bd9f1252f1b745eac6b4a1cc39",
"type": "github"
},
"original": {
@@ -1161,11 +1157,11 @@
]
},
"locked": {
"lastModified": 1777159683,
"narHash": "sha256-Jxixw6wZphUp+nHYxOKUYSckL17QMBx2d5Zp0rJHr1g=",
"lastModified": 1786464033,
"narHash": "sha256-QM8Qe4/L8lpdVN4bgwahmi+jyyc4fisseDMe4afcDxA=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "b8632713a6beaf28b56f2a7b0ab2fb7088dbb404",
"rev": "62e62c1ca23da17612c6890d4ad2064f575643db",
"type": "github"
},
"original": {
@@ -1215,11 +1211,11 @@
]
},
"locked": {
"lastModified": 1784465130,
"narHash": "sha256-ak5fWEmWZyax8trkV4aphdvjrbUiSyl6qS+y5GwBS7Y=",
"lastModified": 1786464294,
"narHash": "sha256-ZQsZ2WvBdkboCIyh8LStDPdAIARmxzn0XMNxxoOhjPE=",
"owner": "hyprwm",
"repo": "hyprwire",
"rev": "7d935bb54674aa0fbd327d2a6888bd0630079ed0",
"rev": "4ce7cd6b6128c1ac41caf23c58a30a26b327f9dd",
"type": "github"
},
"original": {
@@ -1415,6 +1411,22 @@
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1"
}
},
"nixpkgs_10": {
"locked": {
"lastModified": 1785090369,
"narHash": "sha256-m0pDuRJG7EDo9ri+4Ksu83VsI+PlxNC9lNBfydejce4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "624af665418d3c65d544145b4d34ad696439570e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1784160687,
@@ -1477,11 +1489,11 @@
},
"nixpkgs_6": {
"locked": {
"lastModified": 1785454630,
"narHash": "sha256-LQy14TZp77TwbQf40gg1V3jo8FwJG0jGDkAH+zRHqg8=",
"lastModified": 1787736819,
"narHash": "sha256-cV5xEJJK3BvhU8rEd4mC9UsmDi5qscv/kzGPhBRC5WA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1559d3daa3ecc813a650b79375ea61b6741b8746",
"rev": "9fbb54b33e91ee4ca368e35a78e0613c720600b3",
"type": "github"
},
"original": {
@@ -1632,11 +1644,11 @@
]
},
"locked": {
"lastModified": 1784288435,
"narHash": "sha256-ReRHaLgr/uVqdD8afFSn+myXIfpHeOhP0yYe0TJqAA8=",
"lastModified": 1787424939,
"narHash": "sha256-O2tBn84NNuHrnqNVxx/XqsXwfYvS1YwBh+7CBnbCYsk=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "43b3c1ab9d40fb1dbb008f451988a91e375825e9",
"rev": "809414f0cdadf82cf11b06c2b29ba9b3168b3297",
"type": "github"
},
"original": {
@@ -1705,7 +1717,6 @@
"git-hooks": "git-hooks",
"hermes-agent": "hermes-agent",
"home-manager": "home-manager_2",
"hyprgrass": "hyprgrass",
"hyprland": "hyprland",
"hyprlauncher": "hyprlauncher",
"nix-darwin": "nix-darwin",
@@ -1715,6 +1726,7 @@
"nixpkgs": "nixpkgs_9",
"nixpkgs-unstable": "nixpkgs-unstable",
"noctalia": "noctalia",
"scrolloverview": "scrolloverview",
"stylix": "stylix",
"systems": "systems_6"
}
@@ -1736,6 +1748,29 @@
"type": "github"
}
},
"scrolloverview": {
"inputs": {
"flake-parts": "flake-parts_3",
"hyprland": [
"hyprland"
],
"nixpkgs": "nixpkgs_10"
},
"locked": {
"lastModified": 1787510763,
"narHash": "sha256-+mvHHi5Ou9RB6G5E3qMoxkATtAFuFoJlIev0yfkDI0Q=",
"owner": "yayuuu",
"repo": "hyprland-scroll-overview",
"rev": "a8e47fa769be1f0bdceb9869b2dfea97a84a1ecc",
"type": "github"
},
"original": {
"owner": "yayuuu",
"ref": "new-release",
"repo": "hyprland-scroll-overview",
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
@@ -1743,7 +1778,7 @@
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_4",
"gnome-shell": "gnome-shell",
"nixpkgs": [
"nixpkgs"
@@ -1977,11 +2012,11 @@
]
},
"locked": {
"lastModified": 1785359135,
"narHash": "sha256-sRAGZVUPgwxpx19uZwaSERa86g1AbsBUQ3SxhaRPgeg=",
"lastModified": 1786988229,
"narHash": "sha256-frEFLVRj8xXvBBDs44IRiqHo6R2PxsRpluygL7abjjI=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "cc8e5ef8fb2acef3db488b9a33b0c48c2a4ee204",
"rev": "59d429bf45aed4e2209043c0c36565ad8e2859a5",
"type": "github"
},
"original": {
+9 -5
View File
@@ -51,9 +51,13 @@
hyprlauncher.url = "github:hyprwm/hyprlauncher";
# Hyprland compositor via flake (latest git).
hyprland.url = "github:hyprwm/Hyprland";
# Hyprland touchpad gesture plugin
hyprgrass = {
url = "github:horriblename/hyprgrass";
# Hyprland niri-like scroll overview plugin.
# `new-release` branch, not `main`: our hyprland input is a git build, and
# main still includes the pre-refactor managers/EventManager.hpp (fails to
# compile against Hyprland 0.56+git). new-release targets current git.
scrolloverview = {
url = "github:yayuuu/hyprland-scroll-overview/new-release";
inputs.hyprland.follows = "hyprland";
};
# Secrets management
@@ -78,7 +82,7 @@
, stylix
, hyprlauncher
, hyprland
, hyprgrass
, scrolloverview
, dms
, noctalia
, git-hooks
@@ -113,7 +117,7 @@
inherit
hyprlauncher
hyprland
hyprgrass
scrolloverview
nixpkgs-unstable
dms
noctalia
+6 -3
View File
@@ -8,9 +8,12 @@ One NixOS configuration file per managed machine, plus hardware configs and host
hosts/
├── <hostname>.nix # Host configuration (packages, services, options)
├── <hostname>.hardware-configuration.nix # Generated by nixos-generate-config — DO NOT EDIT
├── scripts/
│ └── fwbook/ # fwbook-specific shell scripts
│ └── functions.sh # ZSH functions sourced at shell startup
└── scripts/
├── fwbook/ # fwbook-specific shell scripts
│ ├── functions.sh # ZSH functions sourced at shell startup
│ └── functions.nu # NuShell helpers (k8s namespace/secret listing, secret decoding)
└── fw1/
└── gs.sh # gamescope/Steam launch wrapper (VRR, HDR, mangoapp overlay)
```
## Managed Hosts
+1 -1
View File
@@ -16,7 +16,7 @@ modules/
├── home/ # Home Manager: shell, programs, git, fonts, services
├── nixos/
│ ├── common/ # Core system settings, networking, SSH, QEMU, fonts, hardware
│ ├── server/ # Server services: K3s, Gitea, AI stack, DNS, Dockge, ARRs...
│ ├── server/ # Server services: K3s/K8s, DNS, AI stack, ARRs, media…
│ └── desktop/ # Desktop: tiler (niri/hyprland), packages, theming, crypto
└── openwrt/ # OpenWrt router config generator
```
+6 -3
View File
@@ -16,10 +16,13 @@ core/
## What lives here
- **Overlays** (`default.nix`): exposes `pkgs.grok-cli` (from `pkgs/grok-cli`), `pkgs.buzz-desktop` (from `pkgs/buzz-desktop`), and patches
- **Overlays** (`default.nix`): exposes the `pkgs/` packages — `grok-cli`, `ds4`
(+`ds4-rocm`/`ds4-cuda`), `colibri` (+`colibri-rocm`), `niri-touchscreen-gestures`,
`buzz-desktop`, `ollama` (+`ollama-rocm`/`ollama-vulkan`) — and patches
`python3Packages.pipx` to skip its flaky install check on nixpkgs 26.05.
- **Distributed builds** (`default.nix`): registers `bigbox1.lab.internal` as a remote
`x86_64-linux` build machine and enables `builders-use-substitutes`.
- **Distributed builds** (`default.nix`): registers `bigbox1.lab.internal` and
`fwdesk.lab.internal` as remote `x86_64-linux` build machines and enables
`builders-use-substitutes`.
- **User** (`user.nix`): defines `skyg.user.{name,fullName,email}` plus
`skyg.home-manager.{version,extraImports}`. When `skyg.user.enable` is set it wires up
Home Manager for both `root` and the named user using the functions in `modules/home`.
+2
View File
@@ -14,6 +14,7 @@ common/
├── user.nix # skyg.user.createSystemUser — creates the system user/groups + zsh shell
├── fonts.nix # System font packages + fontconfig defaults (Fira Code, Noto, …)
├── ssh-server.nix # skyg.nixos.common.ssh-server — hardened sshd + master pubkey
├── ssh-notify.nix # skyg.nixos.common.ssh-notify — forward notify-send from SSH sessions to a desktop client
├── qemu.nix # skyg.core.qemu — QEMU/quickemu + SPICE guest tooling
├── containers/ # Docker vs Podman runtime selection
├── hardware/ # GPU, fan control, audio, laptop power, Coral TPU udev
@@ -39,6 +40,7 @@ skyg.core.hostName → networking.nix
skyg.user.createSystemUser → user.nix
skyg.core.qemu.* → qemu.nix
skyg.nixos.common.ssh-server.* → ssh-server.nix
skyg.nixos.common.ssh-notify.* → ssh-notify.nix
skyg.nixos.common.containers.* → containers/
skyg.nixos.common.hardware.* → hardware/
skyg.nixos.common.pritunl.* → pritunl/
+9 -1
View File
@@ -12,6 +12,7 @@ tiler/
├── niri.nix # skyg.nixos.desktop.tiler.niri — niri compositor (sets tiler.enable)
├── niri-touchscreen-gestures.nix # skyg.nixos.desktop.tiler.niri.touchscreen-gestures — touchscreen swipe support
├── hyprland.nix # skyg.nixos.desktop.tiler.hyprland — Hyprland via flake (sets tiler.enable)
├── noctalia.nix # skyg.nixos.desktop.tiler.noctalia — noctalia shell + per-host config symlink
└── swww.nix # skyg.nixos.desktop.tiler.background — swww/waypaper wallpaper tools
```
@@ -34,6 +35,8 @@ skyg.nixos.desktop.tiler.niri.enable
skyg.nixos.desktop.tiler.niri.touchscreen-gestures.enable # 3/4-finger swipes → niri actions
skyg.nixos.desktop.tiler.hyprland.enable
skyg.nixos.desktop.tiler.hyprland.configName # per-host config dir (default: hostName)
skyg.nixos.desktop.tiler.noctalia.enable # standalone noctalia + config symlink
skyg.nixos.desktop.tiler.noctalia.configName # per-host config dir (default: hostName)
skyg.nixos.desktop.tiler.background.enable
```
@@ -43,7 +46,12 @@ skyg.nixos.desktop.tiler.background.enable
`xdg-desktop-portal-hyprland` kept in sync), launched via UWSM. It:
- Installs the noctalia shell and autostart-friendly tools (grim/slurp/satty,
wofi/rofi, hypridle). There is no waybar/hyprpanel — the shell is noctalia.
wofi/rofi, hypridle, wl-clipboard). There is no waybar/hyprpanel — the shell is noctalia.
- Hyprland plugins (=scrolloverview overview): the packages are
installed and their `.so` paths exported as session variables (`SCROLLOVERVIEW_SO`);
`scrolloverview.lua` call `hl.plugin.load` on them. The store path changes on every
flake update, so it can't be hardcoded in the config. The active plugin is toggled
by the `*_SO` line here plus the matching `require()` in `hyprland.lua`.
- Symlinks `~/.config/hypr` -> `configs/<configName>/hypr`, where `configName`
defaults to `config.skyg.core.hostName` (so `fwbook` -> `configs/fwbook/hypr`).
+5 -10
View File
@@ -3,7 +3,7 @@
, pkgs
, skygUtils
, hyprland
, hyprgrass
, scrolloverview
, noctalia
, ...
}:
@@ -56,16 +56,11 @@ in
grim
slurp
satty
hyprgrass.packages.${system}.hyprgrass
scrolloverview.packages.${system}.scrolloverview
];
# Resolved store path for the hyprgrass plugin .so, read by
# configs/fwbook/hypr/conf/hyprgrass.lua via os.getenv to call
# hl.plugin.load(...). Adding the package to systemPackages above only
# puts the file on disk -- Hyprland needs an explicit load call, and the
# store path changes on every flake update so it can't be hardcoded there.
environment.sessionVariables.HYPRGRASS_SO =
"${hyprgrass.packages.${system}.hyprgrass}/lib/libhyprgrass.so";
# Resolved store path for the scrolloverview plugin
environment.sessionVariables.SCROLLOVERVIEW_SO =
"${scrolloverview.packages.${system}.scrolloverview}/lib/libscrolloverview.so";
# Symlink ~/.config/hypr -> configs/<configName>/hypr (host-specific).
system.userActivationScripts.hyprlandConfig.text = skygUtils.makeHyperlinkScriptToConfigs {
+3 -3
View File
@@ -16,14 +16,14 @@ server/
├── dns/ # Local DNS resolver, certbot, local CA
├── k3s/ # Single-binary K3s cluster role
├── k8s/ # Full upstream Kubernetes (master/node)
└── services/ # Self-hosted apps (jellyfin, audiobookshelf, comfyui, scrypted, dockge, ai…)
└── services/ # Self-hosted apps (jellyfin, audiobookshelf, comfyui, ds4, colibri, ai…)
```
## Notable details
- **`timers.nix`** is a reusable helper: anything added to `skyg.server.timers.<name>`
(with `script`, `OnCalendar`, `wantedBy`) becomes a systemd timer + oneshot service. Other
modules (e.g. `services/scrypted.nix`) use it for backups/auto-updates.
(with `script`, `OnCalendar`, `wantedBy`) becomes a systemd timer + oneshot service. Host
files (e.g. `hosts/hl-minipc2.nix`'s scrypted-backups) use it for backups/auto-updates.
- **`exporters.nix`** enables the Prometheus node exporter with the systemd collector and
opens port 9100.
- Naming: this tree mostly uses the legacy `skyg.server.*` prefix for cross-cutting modules
+3 -7
View File
@@ -45,16 +45,12 @@ Then add it to `services/default.nix`'s `imports` list (and to the `services/ABO
6. **Scheduled jobs** (backups, auto-updates) should use the `skyg.server.timers.<name>`
helper in `timers.nix` rather than hand-writing `systemd.timers`/`systemd.services`.
7. **Secrets** (tokens, API keys, join tokens) come from **agenix** (`config.age.secrets.*`)
or an `environmentFile` path — never hardcoded, never committed. See `openclaw.nix` for
the agenix-token pattern and `k3s/`/`dns/routing/` for `envPath`/secret-file patterns.
or an `environmentFile` path — never hardcoded, never committed. See `colibri.nix`/
`signal-cli.nix` for the `environmentFile` (agenix) pattern and `k3s/`/`dns/routing/`
for `envPath`/secret-file patterns.
8. **Stable identities.** Where a service stores data on NFS, keep its `uid`/`gid` fixed and
unique (see `arrs/` and `jellyfin.nix`) so ownership survives across hosts.
## Gotcha: openclaw.nix
`openclaw.nix` is **not** imported by `services/default.nix`. If you enable it, import it
explicitly. Don't assume every file in `services/` is wired in.
## Validation
Do **not** build or switch (see root `GUIDELINES.md`). Use `nix-instantiate --parse` on the
+6 -6
View File
@@ -12,9 +12,9 @@ services/
├── default.nix # imports the services below
├── ai-services.nix # skyg.nixos.server.services.ai — ollama + Wyoming (whisper/piper/wake)
├── audiobookshelf.nix # skyg.nixos.server.services.audiobookshelf — audiobook/podcast server
├── ds4.nix # skyg.nixos.server.services.ds4 — ds4-server HTTP API (DwarfStar local inference)
├── jellyfin.nix # skyg.nixos.server.services.jellyfin — media server (uid/gid 7777)
├── signal-cli.nix # skyg.nixos.server.services.signal-cli — signal-cli HTTP daemon (Hermes Signal bridge)
├── openclaw.nix # skyg.nixos.server.services.openclaw — AI gateway (NOT imported by default)
├── colibri.nix # skyg.nixos.server.services.colibri — coli serve HTTP API (GLM-5.2/OLMoE local inference)
└── comfyui/ # skyg.nixos.server.services.comfyui — ComfyUI with ROCm/CUDA GPU support
```
@@ -23,9 +23,10 @@ services/
- **`ai-services.nix`** runs ollama (GPU-passthrough) and openwakeword as containers and
enables NixOS-native Wyoming faster-whisper + piper. Opens 11434/10200/10300/10400.
- **`openclaw.nix`** is a native systemd service (with agenix-token support and security
hardening). Note: it is **not** listed in `default.nix`'s imports, so it must be imported
explicitly if used.
- **`ds4.nix`** runs `ds4-server` (the OpenAI/Anthropic-compatible HTTP API for DwarfStar
DeepSeek V4 inference) as a native systemd service. `package` selects the backend
(`pkgs.ds4` cpu / `pkgs.ds4-rocm` / `pkgs.ds4-cuda`); model path, ctx, KV offload, and
GPU device IDs are all options.
- **`colibri.nix`** runs `coli serve` (colibrì's OpenAI-compatible API) as a native systemd
service, mirroring `services/ds4.nix`'s shape. `package` picks the backend (`pkgs.colibri`
cpu / `pkgs.colibri-rocm`); `environmentFile` supplies `COLI_API_KEY` via agenix instead of
@@ -36,10 +37,9 @@ services/
```
skyg.nixos.server.services.ai.enable
skyg.nixos.server.services.audiobookshelf.{enable,package,configDir,dataDir}
skyg.nixos.server.services.ds4.{enable,package,model,host,port,ctx,kvDiskDir,...}
skyg.nixos.server.services.jellyfin.enable
skyg.nixos.server.services.scrypted.enable
skyg.nixos.server.services.signal-cli.{enable,host,port,configDir,account,environmentFile,openFirewall}
skyg.nixos.server.services.openclaw.{enable,port,gatewayToken,...}
skyg.nixos.server.services.colibri.{enable,package,model,host,port,environmentFile,openFirewall,...}
skyg.nixos.server.services.comfyui.{enable,mode,port,openFirewall}
```
+1
View File
@@ -13,6 +13,7 @@ Packages here are exposed via an overlay defined in `modules/core/default.nix`.
| `niri-touchscreen-gestures/` | Python daemon that reads multi-touch events from a touchscreen via `evdev`, detects 2/3/4-finger swipes (up/down/left/right), and dispatches configurable `niri msg action` commands. Configured via TOML; exposed as `pkgs.niri-touchscreen-gestures`. |
| `ollama/` | Ollama local LLM inference server, pinned ahead of nixpkgs (0.32.14 vs 0.32.7 in stable/unstable). Derived from nixpkgs master's 0.32.13 derivation (FetchContent-based llama.cpp, Vulkan/ROCm backends) bumped to 0.32.14. Exposed as `pkgs.ollama` (cpu), `pkgs.ollama-rocm` (Strix Halo / gfx1151), `pkgs.ollama-vulkan`. |
| `buzz-desktop/` | Block Buzz desktop (Type-2 AppImage from `block/buzz`). Wrapped with `appimageTools.wrapType2` plus extra FHS libs (`elfutils`, `zstd`, WebKit/tray, GStreamer good/bad) so it runs on NixOS. Exposed as `pkgs.buzz-desktop` (`buzz-desktop` binary + desktop entry / icons). |
| `claude-desktop/` | Claude Desktop (Linux) — `.deb` fetched from `downloads.claude.ai`, unpacked and re-wrapped with `makeWrapper` (binary moved aside, `LD_LIBRARY_PATH` pointed at its bundled libs). Exposed as the `claude-desktop` flake output (via `pkgs.callPackage` in `flake.nix`, not the core overlay) and installed on `fwbook`. |
## Adding a New Package
+24 -5
View File
@@ -8,6 +8,14 @@ Age-encrypted secret files managed with [agenix](https://github.com/ryantm/ageni
|---|---|
| `dns-addresses.conf.age` | DNS address overrides for the dnsmasq module |
| `glmain.json.age` | OpenWrt router credentials/config for `glmain` |
| `hermes-env.age` | Hermes agent env vars (fwbook + fwdesk) |
| `hermes-env` | Unencrypted working copy of `hermes-env.age` |
| `iu-project.age` | iu-project credentials (minipc1) |
| `portainer-agent-bigbox1.age` | Portainer agent env vars (bigbox1) |
| `stack1.age` | Compose definition for stack1 (minipc2) |
| `stack2.age` | Compose definition for stack2 (minipc2) |
The authoritative list of names + authorized keys is `secrets.nix` in the repo root.
## ⚠️ Agent Warning
@@ -18,17 +26,28 @@ Editing them outside of `agenix` will corrupt the secret.
## Workflow (for humans)
```bash
# Edit a secret (decrypts, opens editor, re-encrypts)
skyg secrets edit dns-addresses.conf.age
# List known secret names
skyg secrets
# Re-key all secrets (e.g. after adding a new host key)
skyg secrets rekey
# Decrypt a secret for editing (writes .tmp/unencrypted-<name>)
skyg decrypt dns-addresses.conf
# Re-encrypt after editing (reads .tmp/unencrypted-<name> by default)
skyg encrypt dns-addresses.conf
# Verify your working copy matches the stored secret
skyg compare-secret dns-addresses.conf
```
**Re-keying** (e.g. after adding a host key to `secrets.nix`): there is no bulk
re-key command — for each affected secret run `skyg decrypt <name>` followed by
`skyg encrypt <name>` to re-encrypt it against the updated key set.
## Adding a New Secret
1. Add the `.age` filename and authorized public keys to `secrets.nix`
2. Run `skyg secrets edit <name>.age` to create and encrypt the file
2. Create the plaintext in `.tmp/unencrypted-<name>` (or pass `--source <file>`) and run
`skyg encrypt <name>` (add `--yaml` to validate YAML before encrypting)
3. Reference it in a module via `config.age.secrets.<name>.path`
See `docs/agenix.md` for the full workflow reference.