122 Commits
Author SHA1 Message Date
ari 3def9ce938 Merge pull request 'hermenix: stack2 — wait for healthy gluetun before qbittorrent' (#14) from hermes/nixos-setup:hermenix/stack2-gluetun-health into main
Reviewed-on: http://gitea.app.internal:3000/ari/nixos-setup/pulls/14
2026-11-22 15:37:14 +00:00
Hermenix 2e540a2224 hl-bigbox1: cap CPU idle at C1
bigbox1 (Ryzen 5 4600G, B550 GAMING X V2, BIOS FC) hard-froze 5 times
in 16 days (Nov 4 19:07, Nov 16 01:22, Nov 17 02:03, Nov 17 22:59,
Nov 19 18:20 ET), always while idle, each time with no log line and an
"uncleanly shut down" journal on the next boot. That matches the known
Ryzen deep-idle (C6) freeze.

acpi_idle exposes C1 (MWAIT), C2 and C3 (lat 350us, the deep state);
processor.max_cstate=1 keeps cores out of C2/C3. Cost: a few watts
more at idle.

The runtime watchdog (common.dns, SP5100 TCO, 30s) was armed during the
Nov 19 boot and did not reset the box, so it is not a safety net here
and is left as is.
2026-11-21 02:58:14 +00:00
ari 89484504e4 unami 2026-11-20 16:29:54 -05:00
ari 6fbc61c7ea slack bump 2026-11-20 16:08:51 -05:00
ari 1dc3ae47f9 Serve the LoopRail site from Caddy on minipc3 2026-11-20 15:09:26 -05:00
ari a092e23f6e bumps 2026-11-19 21:47:48 -05:00
Hermenix 7a973aaee6 diagnix: add diag-pstore
/sys/fs/pstore is root-only and holds the kernel's crash records from
the previous boot, the only trace a hard freeze leaves when the journal
is cut off. diag-pstore prints them via the existing NOPASSWD sudo list.
ABOUTME updated for both diagnix changes.
2026-11-20 01:34:41 +00:00
Hermenix 5c48ef9c1e diagnix: let the hermenix VM log in
hermenix had no shell route to lab hosts, so a hard freeze (bigbox1,
Nov 19 18:21 ET) could only be read through slinuxm's warning-level
journal window, which misses the info-level tail before the crash.

- hosts.nix: a dedicated hermenix-diagnix key, separate from the
  hermenix agenix key, accepted only from hl-fwdesk's addresses
  (10.0.10.11, 10.0.101.101) and the guest address 10.77.0.2.
- default.nix: keyLine takes the key; new
  skyg.nixos.common.diagnix.hermenix.enable (default true) adds the
  hermenix key line with the same restrict,pty + slice limits.
- hl-fwdesk hermenix.nix: lanAccess to 10.0.10.0/24 port 22.
2026-11-20 01:34:41 +00:00
hermenix 01f039a5ce stack2: wait for healthy gluetun before starting qbittorrent
qbittorrent shares gluetun's network. When it starts before the VPN
tunnel is up it never reaches the swarm, and torrents sit on
"downloading metadata" until it is restarted by hand (seen 2026-11-19:
qbit up 12:37:40, tun0 only up 12:38:57 after a failed first server).

- qbittorrent depends_on gluetun with condition: service_healthy and
  restart: true, so it waits for the tunnel and restarts with gluetun
- drop HEALTH_VPN_DURATION_INITIAL, which gluetun v3.41 reports as obsolete

Re-encrypted to the same recipients as secrets.nix: ari, minipc2, hermenix.
2026-11-19 13:06:44 +00:00
ari 4c9d8f88cb fixing stack2 & 1 2026-11-19 07:47:26 -05:00
ari c8223aec40 fixing stack2 & 1 2026-11-19 07:34:36 -05:00
ari 6abc047879 fixing stack2 2026-11-19 07:18:28 -05:00
ari a48af90346 version bumps 2026-11-18 16:14:21 -05:00
ari 32ea399d89 github runners 2026-11-18 12:50:45 -05:00
ari 705f2eb4c6 precommit 2026-11-18 12:22:04 -05:00
ari 5139a55daa version bumps 2026-11-18 12:20:19 -05:00
ari f9835c150f cleaning up after my clanker 2026-11-17 14:57:04 -05:00
ari e9479f9be1 cleaning up after my clanker 2026-11-17 14:43:55 -05:00
ari a1ebcfb6aa converting loops 2026-11-17 14:22:28 -05:00
ari 956158729e Merge branch 'main' of gitea.app.internal:ari/nixos-setup 2026-11-17 14:10:17 -05:00
ari 87aea41843 less frequent updates 2026-11-17 14:10:00 -05:00
ari f3d03f4c20 looprails 2026-11-17 13:52:08 -05:00
Hermenix ff770c1d03 dns-resilience: Hardened systemd-resolved with scoped host enablement
Add hardened systemd-resolved DNS with boot verification and journal recovery,
enabled only on specific hosts:
- hl-bigbox1, hl-bigbox2 (experienced DNS resilience issues)
- hl-minipc1, hl-minipc2, hl-minipc3 (minipc cluster)
- hl-fwdesk, hl-fws1 (desktop/workstation nodes)

Changes:
1. New module: modules/nixos/common/dns/default.nix
   - systemd-resolved with LLMNR fallback and DNSSEC tolerance
   - Hardened journald with persistent storage and auto-recovery
   - Boot-time DNS verification service with 5 retries
   - Systemd watchdog for automatic reboot on DNS failure

2. Default to false, enabled explicitly on target hosts only
3. Updated host configs to enable dns resilience module
2026-11-17 18:25:20 +00:00
ari d7875b588e multi-slackssss!! 2026-11-16 10:06:48 -05:00
ari 5881b9c8be general clean up of nbot 2026-11-15 15:15:01 -05:00
ari d7bd46c0cd clean up 2026-11-14 22:58:25 -05:00
ari b583c550f3 clean up 2026-11-14 22:57:54 -05:00
ari 08207da02b looprails 2026-11-12 17:19:14 -05:00
ari 3efec42e72 clean up 2026-11-12 16:53:01 -05:00
ari fb5503ec36 Merge remote-tracking branch 'github-hermenix/fix/cache-push-ssh' 2026-11-12 11:17:33 -05:00
ari be6e7492b3 latest nbot 2026-11-12 11:17:21 -05:00
ariandnBot 10d85b2a91 Push builds to bigbox2 over ssh-ng from a background queue
bigbox2 runs nix-serve, which only serves its own store: every
'nix copy --to http://bigbox2.lab.internal:5000' from the post-build hook
ended in HTTP 404 after compressing the whole closure, so nothing ever
landed and the next build tried the same paths again. A post-build-hook
also blocks the build until it returns, which held up every build on
fwdesk (nbot's VM checks spent most of a cold CI run there).

- cacheReceive (on bigbox2): nix.sshServe with write over ssh-ng, for
  fwdesk's ssh host key; nix-ssh is trusted, and nix-serve signs the
  pushed paths when it serves them.
- cachePush: the hook only queues $OUT_PATHS. nix-cache-push.service
  drains the queue with nix copy to ssh-ng://nix-ssh@bigbox2.lab.internal
  as the host key, with bigbox2's host key pinned; a path unit starts it,
  and a failed push is retried every 10 minutes by a timer.

Co-Authored-By: nBot
2026-11-12 10:12:07 -05:00
ari 6db82ed10a Merge branch 'main' of gitea.app.internal:ari/nixos-setup 2026-11-11 17:02:43 -05:00
ari 09c6fe2235 debug agent 2026-11-11 17:02:36 -05:00
ari 2547ec45b4 clear up 2026-11-11 12:03:09 -05:00
hermenix 26856003d4 llama-cpp: add CUDA support and bigbox1 RTX 3060 service config
- Extend pkgs/llama-cpp to support CUDA backend (backend="cuda") for NVIDIA GPUs
- Add llama-cpp-cuda variant to modules/core/default.nix overlay
- Create hosts/hl-bigbox1/services/llama-cpp.nix with RTX 3060 tuning:
  * gpuLayers=30 (conserve 12GB VRAM for context)
  * parallel=2 (handle concurrent requests on smaller VRAM)
  * Same Qwen3.8-27B + DFlash2 drafter as fwdesk
- Wire service into bigbox1 services/default.nix
- Disabled by default (weights download manual)
2026-11-11 16:02:41 +00:00
hermenix ce92096042 llama-cpp: llama-server with DFlash2 speculative decoding for gfx1151
v0.8.0 is the first upstream release with DFlash2 drafters; nixpkgs has 0.6.0 (unstable) and an older tree (stable), so the engine is built here. HIP build for Strix Halo. The NixOS module exposes llama-server behind skyg.nixos.server.services.llama-cpp; fwdesk wires it to Qwen3.8-27B + its DFlash2 drafter, disabled until the weights are on disk.
2026-11-11 16:01:32 +00:00
ari 62c41a6f8e clean up pkgs 2026-11-11 10:35:30 -05:00
ari d8ea131327 clean up pkgs 2026-11-10 16:38:18 -05:00
ari a3178f0507 latest work 2026-11-10 15:00:43 -05:00
ari 3b44ae1354 workflow bump 2026-11-10 14:47:10 -05:00
ari e72789fbb1 bump the version 2026-11-10 10:35:09 -05:00
ari f06921593d Merge branch 'main' of gitea.app.internal:ari/nixos-setup 2026-11-10 10:04:27 -05:00
ari 416c648f99 local fixes 2026-11-10 10:03:09 -05:00
Hermenix 25a21d2f66 nbot: bump to c2491e9 (4fdd292 → c2491e9)
Consolidate environmentFile handling in both hosts via nbot module.
2026-11-10 14:55:28 +00:00
ari dfd4ca06a2 registering nbot wf 2026-11-09 16:13:26 -05:00
ari d337d7605e workflows 2026-11-09 16:06:03 -05:00
ari f2d1ce5744 nbot bump 2026-11-09 13:22:40 -05:00
Hermenix a8bc08de43 container-services: queue the env-reload restart instead of blocking on it
The env-reload unit is a oneshot whose ExecStart was a blocking
systemctl restart of the group unit. When the stack's cold start failed
transiently (container-services-buzz on minipc1, where buzz-relay-1 came
up unhealthy and compose exited 1), the group unit recovered on its own a
few seconds later through its own Restart=on-failure, but the reload unit
had already exited 1 with no restart policy and stayed failed until the
next env file write.

The trigger unit should queue the restart, not own the health of the whole
stack: pass --no-block. Real failures still surface on the group unit,
which carries Restart=on-failure and the start limit and is what the fleet
scan reports.
2026-11-09 15:04:30 +00:00
ari 0c265f7a74 latest nbot 2026-11-08 12:23:04 -05:00
Hermenix d6b79f8d8d nbot: bump to 45c6a48 and enable kvm
nbot 04ade8b -> 45c6a48 (revCount 654 -> 857). The host module gained a new
kvm option to pass -kvm to the nbot binary, which binds /dev/kvm into every
container on the node for workloads that need to run VMs.

KVM is enabled on both fwdesk (master) and fws1 (slave).
2026-11-08 15:23:29 +00:00
ari 39fc85e8f9 latest nbot 2026-11-07 10:51:47 -05:00
ari 088de60af5 cleaning up old bots 2026-11-07 10:50:23 -05:00
ari eb94f5a034 nbot: bump to a6451cb and set the new drive and cluster flags
nbot 8daeca5 -> a6451cb (revCount 492 -> 652). The two config shape
changes in that range are allow_subdir on a drive and master_fingerprint
as a list; summaries.enabled is now ignored because summaries are always
on. The host module gained drives and stateDir, which feed
RequiresMountsFor= so the unit waits for its disks.

The nbot input stays on git+ssh: the repo is private, so git+https
cannot fetch it without credentials.
2026-11-07 15:02:56 +00:00
ari 91d6511f01 nbot updates 2026-11-06 12:59:31 -05:00
ari e3f01e3c35 cleaning up old bots 2026-11-05 15:21:01 -05:00
ari 880c85facb added more capacity 2026-11-05 15:00:35 -05:00
ari 6ff3b48fcf new secret 2026-11-05 12:30:08 -05:00
ari eb862ebf7e fixing stack2 + nbot changes 2026-11-05 12:22:23 -05:00
ari fa5343f211 Merge branch 'main' of gitea.app.internal:ari/nixos-setup 2026-11-04 08:20:37 -05:00
ari 82480e88f4 latest ping for nbot 2026-11-04 08:19:02 -05:00
ari a60b842ee2 more nbot stuff 2026-11-03 19:21:50 -05:00
ari 2d09b6c69f nbots 2026-11-03 15:25:54 -05:00
ari e2bff381b9 nbots 2026-11-03 14:02:31 -05:00
ari 2b83e9c606 nbots 2026-11-03 10:22:40 -05:00
Hermenix 1c420283f4 buzz: prebuild artifact-sync indexes before relay migrates
The relay image is ghcr.io/block/buzz:main with autoUpdate and
BUZZ_AUTO_MIGRATE=true. On 2026-11-02 an auto-update pulled a newer build
whose migrations include 0078_artifact_sync_indexes.sql. That migration
refuses to create its four indexes inline once the target table is
populated -- it raises "prebuild <index> concurrently" and points at
docs/artifact-sync-deployment.md. channel_members is populated on a live
relay, so migration 78 aborts, the relay exits 1 and has been
crash-looping ever since. The schema sits at 0077, so every earlier
migration (including 0077_artifact_sync_timestamps) is applied; rolling
the image back is not an option because sqlx rejects a schema that is
ahead of the binary's known migrations.

Fix the gate instead of the image: a one-shot compose service,
relay-index-prebuild, runs on the postgres image after postgres reports
healthy and builds the four indexes CONCURRENTLY. Each index is checked
first -- missing, valid, or invalid (present but not
indisvalid/indisready/indislive); an invalid leftover is dropped
concurrently before the rebuild, and an already-valid index is left
alone, so re-runs are cheap and safe. The relay now waits on
relay-index-prebuild completing successfully, next to its existing
postgres/redis/minio/minio-init conditions.

Authored by hermenix.
2026-11-03 04:32:29 +00:00
ariandClaude Opus 5.5 8fec1dd4bb bazel-build: simpler idmap note and TODO
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119iKoN3fSvRGUAYHupPW4U
2026-11-01 23:26:20 -05:00
ariandClaude Opus 5.5 18f4639bb7 bazel-build: clarify what idmap does on the repo cache bind
Container root stays an unprivileged host user; idmap only maps file
owners on that mount. Add a TODO for sharing the cache without
root-owned files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119iKoN3fSvRGUAYHupPW4U
2026-11-01 23:24:40 -05:00
ariandClaude Opus 5.5 fdf7ecb3e4 bazel-build: drop the handoff note from the header
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119iKoN3fSvRGUAYHupPW4U
2026-11-01 23:20:17 -05:00
ariandClaude Opus 5.5 2a2b1d8421 bazel-build: remote-only builds for slackerbot containers
- Containers get an enforcing bazel wrapper: remote spawn strategy, no
  local fallback, and refused override flags. Gateway rc is written at boot.
- NativeLink: ExecPaths for the DynamicUser state dir (was noexec).
- Bazel server exits after 5 idle minutes; shared per-host repo cache
  (/repo-cache, idmap); goose hints say a local build means trouble.
- Removed the /handoff -> /outputs materializer; outputs download into
  bazel-bin again.
- slackerbot containers: 4G/1 CPU, up to 8G/2 CPUs.
- fws1: disable networkd wait-online.
- slackerbot 4db99ea (send_file symlinked home, trimmed tool lines).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119iKoN3fSvRGUAYHupPW4U
2026-11-01 23:14:35 -05:00
ari 594a1c1901 bazel related limit issues 2026-11-01 16:17:50 -05:00
ari dd4965f030 bazel 2026-11-01 14:26:16 -05:00
ari a12f10d964 slackerbot test 1 2026-11-01 13:48:03 -05:00
ari 9856e11416 clean up lid watchers 2026-10-29 14:18:27 -04:00
ari fd733cdc21 Genix rebuilds + hyprland version fix 2026-10-29 14:09:21 -04:00
ari cd7c908fde updated secrets 2026-10-28 13:44:54 -04:00
ari 62e73eb4d2 using seperate robotnix 2026-10-27 13:28:27 -04:00
ari 0efbc5817b setup siblix on buzz working 2026-10-27 09:56:57 -04:00
ari 2e8529fff0 buzz & precommits 2026-10-26 16:26:06 -04:00
ari 3a2cb09d07 added sibli support for buz 2026-10-26 16:18:48 -04:00
ari bfdcd45746 split bots 2026-10-26 14:36:03 -04:00
ari 9217e61675 scrypted hf token 2026-10-26 10:25:19 -04:00
ari 6f0efacfca added visibility to hermenix 2026-10-26 10:03:36 -04:00
ari eecad5cc4a Merge branch 'main' of gitea.app.internal:ari/nixos-setup 2026-10-26 10:01:30 -04:00
ari 6ec9594f92 Merge pull request 'hl-minipc2: bound the journal, give Scrypted the iGPU, add a hermenix secrets recipient' (#1) from hermes/nixos-setup:fix/minipc2-scrypted into main
Reviewed-on: http://gitea.app.internal:3000/ari/nixos-setup/pulls/1
2026-10-26 14:01:14 +00:00
ari 567a85b946 Merge pull request 'robotnix: create /usr/bin in the robot root so nspawn can start genix' (#2) from hermes/nixos-setup:fix/lab-robotnix-genix-ostree into main
Reviewed-on: http://gitea.app.internal:3000/ari/nixos-setup/pulls/2
2026-10-26 14:00:57 +00:00
ari 95b6885f4e bump the version 2026-10-26 09:59:27 -04:00
Hermenix 57fbf70b7c hl-fwdesk: ignore hermes VM fabric links in networkd wait-online
systemd-networkd-wait-online fails on every boot of hl-fwdesk with
"Timeout occurred while waiting for network connectivity" and
status=1/FAILURE.  The hermes VM runs on this host via services.hermenix
(ari/hermenix flake input), and its fabric interfaces -- the bridge
hermes-br and the tap vm-hermes -- are managed by systemd-networkd
(10-hermes-br.network, 11-vm-hermes.network).  networkd-managed links
default to RequiredForOnline=yes, but those two links only gain carrier
when the VM starts, which on the sampled boot was 0.2s after the 120s
wait-online timeout fired.  The only networkd link that never blocks is
robotnix's own bridge, and the physical uplink enp191s0 is owned by
NetworkManager, so it is invisible to networkd.  The result is a unit
that always burns the full timeout and then fails.

hermenix now passes --ignore=hermes-br --ignore=vm-hermes to the unit,
so it no longer treats the VM's fabric links as a condition for
"online": with every candidate ignored the wait returns immediately
instead of blocking and then failing.  The unit itself stays enabled
and anyInterface is untouched.

The durable fix belongs in ari/hermenix: set RequiredForOnline = "no" on
the hermes-br and vm-hermes .network files, the same way
modules/nixos/server/robotnix/network.nix already does for the robotnix
fabric.  That repository is out of scope for this change; once it lands
this ignoredInterfaces entry can be dropped.

Found by hermenix from the fleet monitor's persistent failure record
for unit:hub:systemd-networkd-wait-online.service.
2026-10-26 00:46:08 +00:00
Hermenix 86f9ae010e robotnix: give the robot root a /usr tree before nspawn starts
robotnix-genix.service on hub was in start-limit-hit with exec_main_status 1.
systemd-nspawn refused the root: "Directory /run/robotnix/genix/root doesnt
look like it has an OS tree (/usr/ directory is missing). Refusing." The storage
and seed units were healthy (image mounted, "installation finished!"), so the
tree existed and was populated - it was just missing /usr.

The seed script ends with a tail block that runs on every invocation, not only
when it installs: it creates etc, var/lib, root and home, and touches os-release
and machine-id. That list was copied from nixos-containers but dropped its first
line, mkdir -p "$root/usr/bin" (nixos-containers.nix:102). nspawn treats the
presence of /usr as the marker of an OS tree, so every start died before the
init ran, and because the unit restarts on failure it burned through the start
limit instead of recovering.

Add that mkdir with an explicit 0755 mode to the same tail block. Because the
block is outside the first-install branch, the directory is created on the next
storage+seed run for an already seeded root, so this needs no robotnix reseed
and loses no data. The module layout is unchanged.

ABOUTME.md gains a Notes/decisions bullet recording why the root gets /usr/bin
and that no reseed is required.
2026-10-26 00:45:42 +00:00
Hermenix 520f804738 secrets: declare a hermenix recipient 2026-10-26 00:28:45 +00:00
Hermenix 9b537c9f62 hl-minipc2/scrypted: pass /dev/dri into the container
Without it VAAPI cannot be enumerated and the 4608x1728 H.265 stream is
software-decoded, which is what times out Living Room analysis.
2026-10-26 00:28:45 +00:00
Hermenix bb3c73b310 hl-minipc2: cap the systemd journal at 1G
One stuck Scrypted prune loop was writing ~180k lines (62 MB) a day and
pushed every other fault out of a four-minute window.
2026-10-26 00:28:45 +00:00
ari eb6380ddfe Robotnix v1 2026-10-23 15:26:04 -04:00
ari 0cf504ad27 remiving fwmgr from bigboxes too 2026-10-21 14:43:02 -04:00
ari 39f062a7af safeguarding k3s & removing fwmgr from machines that have hardware with no upstream updates 2026-10-21 14:40:10 -04:00
ari 4c8efd185d updates 2026-10-21 11:04:51 -04:00
ari 5d2ff990ae limit builds 2026-10-21 09:34:30 -04:00
ari 4a72048f0d bye tether & hello new flakes 2026-10-21 00:46:09 -04:00
ari 97644f4598 secrets for fwdesk 2026-10-21 00:24:29 -04:00
ari 53e272367e setup for peers 2026-10-21 00:07:50 -04:00
ari b53ab9c854 clean up & bump of skyg 2026-10-20 23:30:28 -04:00
ari 32bc1e83e9 fixing buzz pairing 2026-10-20 16:46:54 -04:00
ari b0da186ed3 trying to fix reauth on fprint 2026-10-20 16:28:45 -04:00
ari 3c244541cb cleaner caddy setup 2026-10-20 16:11:13 -04:00
ari 8dcbd3bf6c clean up of caddy 2026-10-20 15:50:41 -04:00
ari 56f93456cd tighter access 2026-10-20 15:41:45 -04:00
ari 7f8db88b8c filtering 2026-10-20 15:35:24 -04:00
ari 246f2cf360 bye superset 2026-10-20 15:05:27 -04:00
ari c9f459d4c6 disable local hhstream 2026-10-20 15:01:19 -04:00
ari e962c5cebc hyprland on noctalia again 2026-10-20 10:40:31 -04:00
ari 7dd5f9e17b using unstable devenv + pushing llm tools to fwdesk 2026-10-19 21:58:56 -04:00
ari 53c41cf826 fixing boot tracking 2026-10-19 15:49:19 -04:00
ari 4f3a95b42c tracking 2026-10-19 14:49:47 -04:00
ari da93290953 fixing caddy rev 2026-10-19 10:07:35 -04:00
ari e719674851 killing exporters 2026-10-16 16:59:09 -04:00
ari 3b764654d2 exposing web port for hermenix files 2026-10-16 16:43:07 -04:00
ari 71f0c086a4 new qts 2026-10-16 15:20:52 -04:00
ari 1e6cf7251f full deprecation 2026-10-16 15:07:11 -04:00
ari a8fa1f83af net check part 2 2026-10-16 12:23:27 -04:00
ari ee00ccb0d7 net check 2026-10-16 12:14:15 -04:00
ari faeeb885b6 immich in parallel 2026-10-16 10:08:33 -04:00
ari 6737aaa289 limit container 2026-10-15 20:44:30 -04:00
185 changed files with 3831 additions and 1188 deletions

No files matched your search

+18
View File
@@ -0,0 +1,18 @@
# .agents/looprails
Looprail files for this repo.
## journal-triage
`journal-triage.toml` reads the journald log of this machine, has Claude Opus triage it
against this repo, and writes a report ranked by urgency to `.tmp/journal-reports/<host>-<date>.md` (gitignored).
- `journal-triage/collect.sh`: pulls warnings (and worse), failed units and a digest of
unique messages into the run folder.
- `journal-triage/triage.md`: the brief for Opus. It reads `GUIDELINES.md`, traces each issue to
`hosts/<host>/` or `modules/`, and suggests fixes as repo changes. It only reads and suggests:
no edits, no builds, no sudo.
- Inputs: `since` (default `24 hours ago`), `priority` (`err`, `warning`, `notice`),
`host` (default `fwbook`), `repo` (default `/home/ari/nixos-setup`).
Run: `looprail run .agents/looprails/journal-triage.toml`, or ask the agent to run it.
+45
View File
@@ -0,0 +1,45 @@
name = "journal-triage"
description = "Collect journald warnings, triage them with Claude Opus against this repo, and write an urgency-ranked report with fixes as repo changes."
[inputs.static]
since = { type = "string", description = "How far back to read the journal.", min_length = 1, default = "24 hours ago" }
priority = { type = "enum", description = "Lowest log priority to include.", values = ["err", "warning", "notice"], default = "warning" }
host = { type = "string", description = "Name of the host folder under hosts/ to trace issues to.", min_length = 1, default = "fwbook" }
repo = { type = "string", description = "Path of the NixOS config repo.", min_length = 1, default = "/home/ari/nixos-setup" }
[[step.collect]]
kind = "shell"
description = "Collects journal warnings and failed units into a digest."
cwd = "{{ inputs.repo }}"
run = ["sh .agents/looprails/journal-triage/collect.sh {{ inputs.since }} {{ inputs.priority }}"]
[step.collect.outputs]
raw_log = { type = "string", description = "Path of the full raw journal log." }
digest = { type = "string", description = "Path of the deduplicated digest." }
lines = { type = "int", description = "Number of raw log lines." }
unique = { type = "int", description = "Number of distinct messages." }
[[step.triage]]
kind = "agent"
description = "Has Opus triage the log against the repo and suggest fixes."
needs = ["collect"]
agent = { command = ["claude-agent-acp"], model = "opus" }
cwd = "{{ inputs.repo }}"
brief = "journal-triage/triage.md"
failover = "agent"
[step.triage.outputs]
summary = { type = "string", description = "Markdown report ranked by urgency.", min_length = 1 }
issues = { type = "list", description = "The issues found, with urgency, fix and files.", items = { title = { type = "string" }, urgency = { type = "enum", values = ["critical", "high", "medium", "low", "noise"] }, fix = { type = "string" }, files = { type = "list" } } }
[[step.report]]
kind = "shell"
description = "Writes the report to .tmp/journal-reports."
needs = ["triage"]
run = [
"R={{ inputs.repo }}; mkdir -p \"$R/.tmp/journal-reports\"",
"S={{ steps.triage.outputs.summary }}; H={{ inputs.host }}; R={{ inputs.repo }}; f=\"$R/.tmp/journal-reports/$H-$(date +%Y-%m-%d-%H%M).md\"; printf '%s\\n' \"$S\" > \"$f\"; echo \"report=$f\" >> \"$NBOT_LR_OUTPUTS\"; echo \"Report written to $f\"",
]
[step.report.outputs]
report = { type = "string", description = "Path of the written report." }
+26
View File
@@ -0,0 +1,26 @@
#!/bin/sh
# Collect journald warnings+ and failed units into the run folder, plus a deduplicated digest.
set -eu
since="$1"; priority="$2"
dir="$NBOT_LR_RUN_DIR"
raw="$dir/journal-raw.log"; digest="$dir/journal-digest.txt"
journalctl -p "$priority" --since "$since" --no-pager -q -o short-iso > "$raw" || true
{
echo "=== Failed systemd units ==="
systemctl --failed --no-legend --plain || true
systemctl --user --failed --no-legend --plain 2>/dev/null || true
echo
echo "=== Boots in window ==="
journalctl --list-boots --no-pager -q | tail -5 || true
echo
echo "=== Unique messages (count, source: message; numbers/hex normalized), most frequent first ==="
cut -d' ' -f3- "$raw" \
| sed -E 's/\[[0-9]+\]//; s/0x[0-9a-fA-F]+/0xN/g; s/[0-9]+/N/g' \
| sort | uniq -c | sort -rn | head -400
} > "$digest"
lines=$(wc -l < "$raw")
uniq=$(grep -c '^ *[0-9]' "$digest" || true)
printf 'raw_log=%s\ndigest=%s\nlines=%s\nunique=%s\n' "$raw" "$digest" "$lines" "$uniq" >> "$NBOT_LR_OUTPUTS"
@@ -0,0 +1,65 @@
You are triaging the systemd journal of the NixOS host `{{ inputs.host }}`, and tracing each issue
back to the NixOS config repo that builds it: {{ inputs.repo }} (your working folder).
Window: since {{ inputs.since }}, priority {{ inputs.priority }} and worse.
{{ steps.collect.outputs.lines }} log lines, {{ steps.collect.outputs.unique }} distinct messages.
- Digest (failed units, boots, deduplicated messages with counts): {{ steps.collect.outputs.digest }}
- Full raw log (timestamps, for context): {{ steps.collect.outputs.raw_log }}
## Rules: read and suggest only
- Change nothing. Do not edit, create or delete files, in the repo or anywhere else.
- Do not run builds or switches: no `nixos-rebuild`, `nh`, `skyg`, `nix build`, `nix flake check`,
`nixos-anywhere`, docker/podman builds. No sudo. No git commands that change state.
- You may run read-only commands: `systemctl status`, `journalctl -u`, `ls`, `cat`, `grep`, `rg`,
`git log`, `git diff`, `nix-instantiate --parse`.
- Never read anything in `secrets/`.
## Steps
1. Read `GUIDELINES.md` in the repo. Your suggested changes must follow it.
2. Read the digest, then grep the raw log for detail where needed.
3. Group related messages into issues. Ignore harmless boot-time noise unless it points to
something real; list it briefly under "noise" so the reader knows it was seen.
4. For each real issue, find where it comes from in the repo: start with `hosts/{{ inputs.host }}/`,
then `modules/`, `configs/`, `pkgs/` and `flake.nix`. Check whether another host
(`hosts/*/`) already solves the same problem, and reuse that pattern.
Note when the cause is outside the repo (a hand-written file in `~/.config`, state on disk).
## How to write fixes
- Give each fix as a short suggested Nix change with its repo path, e.g.
`hosts/{{ inputs.host }}/systemd.nix` plus a small snippet.
- Follow the repo's layout: put config in the matching host sub-file (`hardware.nix`, `systemd.nix`,
`packages.nix`, `networking.nix`, `services.nix` or `services/<name>.nix`, `home/default.nix`).
Custom options live under `skyg.*`; check `modules/lib.nix` before naming one.
- Never suggest `imports = [...]` in host files.
- Never suggest editing `flake.lock`, anything in `hosts/*/hardware-configuration/` or
`*.hardware-configuration.nix`, or `secrets/`. If the cause lives there, say so and suggest an
override in the right host sub-file instead (e.g. `fileSystems."/boot".options` in `hardware.nix`
with `lib.mkForce`).
- When a fix is imperative (a one-off command), say it needs to be run by hand, and prefer a
declarative option when one exists.
- Remind the reader that they rebuild themselves; do not tell them a change has been applied.
## Urgency
- critical: data loss, security, hardware failing, system unbootable or core service down
- high: a service failing or crash-looping, repeated errors with user-visible effect
- medium: degraded behaviour, misconfiguration, something that will bite later
- low: cosmetic or rare warnings worth a look
- noise: benign, safe to ignore
## Output
`summary` is a Markdown report:
- a one-paragraph overview
- sections by urgency, critical first; each issue with evidence (unit, sample message, count,
first/last seen), likely cause, the repo files involved, and fixes as suggested repo changes
- a short "Repo recommendations" section: patterns across hosts or modules worth changing
(duplication, hand-made units that should be declarative, a fix that would help other hosts too)
Keep it concise, with plain words.
`issues` is the same issues as a list; `files` holds the repo paths involved (empty if none).
+8
View File
@@ -0,0 +1,8 @@
---
name: nbot-wf
description: When anything to do with workflows comes up, use the nbot-wf MCP tools; if they are not available, run nbot-wf install and restart the session.
---
When anything to do with workflows comes up, use the nbot-wf MCP tools; if they are not available, run `nbot-wf install` and restart the session.
The `get_workflow_guide` tool explains how to find, run, watch, answer, stop, resume, write and update a workflow.
+3
View File
@@ -0,0 +1,3 @@
[mcp_servers.nbot-wf]
command = "nbot-wf"
args = ["mcp"]
+6
View File
@@ -42,3 +42,9 @@ docs
.claude
.mnt
.pi
# Zed local settings (machine-local MCP tokens live here)
.zed/settings.local.json
.nbot-wf
+10
View File
@@ -0,0 +1,10 @@
{
"mcpServers": {
"nbot-wf": {
"command": "nbot-wf",
"args": [
"mcp"
]
}
}
}
+1 -1
View File
@@ -1 +1 @@
/nix/store/8wpcklj1m0cp057gvc6ksvkc6znlipd5-pre-commit-config.json
/nix/store/mbdhxcacyi218765m4p2b53ww4fhrlsf-pre-commit-config.json
+34 -25
View File
@@ -1,29 +1,38 @@
{
"show_completions_on_input": true,
"languages": {
"QML": {
"colorize_brackets": true,
"inlay_hints": {
"show_background": true,
"enabled": true
},
"show_whitespaces": "all",
"show_completions_on_input": true,
"always_treat_brackets_as_autoclosed": true,
"format_on_save": "on",
"language_servers": ["qmljs"]
}
},
"lsp": {
"qmljs": {
"context_servers": {
"linux-tracker": {
"url": "http://fwdesk.lab.internal:1984/mcp"
}
},
"languages": {
"QML": {
"colorize_brackets": true,
"inlay_hints": {
"show_background": true,
"enabled": true
},
"show_whitespaces": "all",
"show_completions_on_input": true,
"always_treat_brackets_as_autoclosed": true,
"format_on_save": "on",
"language_servers": [
"qmljs"
]
}
},
"lsp": {
"qmljs": {
"enable_lsp_tasks": true,
"binary": {
"path": "qmlls",
"arguments": ["-E"]
},
"initialization_options": {
"buildDir": "."
}
}
}
"binary": {
"path": "qmlls",
"arguments": [
"-E"
]
},
"initialization_options": {
"buildDir": "."
}
}
}
}
+1 -1
View File
@@ -10,7 +10,7 @@ Key non-negotiable rules from that file:
changes — no matter how small the task.
- **Never run builds, system switches, or remote installs** (`nixos-rebuild`,
`nh os`, `skyg os`, `skyg remote install`, `nixos-anywhere`, `nix build`,
`nix flake check`, etc.) — zero exceptions, even if asked.
`nix flake check`, etc.). You may only run it after asking the user 3 times if the are sure about it!
- Never edit `flake.lock`, `*.hardware-configuration.nix`, or anything in
`secrets/`.
- Never add `imports = [...]` to host files.
+91 -117
View File
@@ -1,179 +1,153 @@
# NixOS System Configurations
My comprehensive Nix configurations for managing multiple hosts, including local machines and remote servers.
Nix configs for all my machines: local desktops/laptops and homelab servers.
## Repository Layout
```
nixos-setup/
├── bin/ # `skyg` CLI
│ ├── skyg # Bash shim → NuShell command modules in bin/lib/
│ ├── check-flake-versions # Shim for `skyg flake check-versions`
│ ├── temp-monitor # NuShell CPU/GPU temperature logger (see TEMP_MONITOR_README.md)
│ └── lib/ # NuShell command modules (os, remote, secrets, ca, pkgs, flake, build, render, hm)
├── configs/ # Application-specific configurations (incl. configs/pki TLS certs)
├── pkgs/ # Custom packages (buzz-desktop, colibri, delta-editor, niri-touchscreen-gestures, superset-desktop)
├── hosts/ # One folder per host (fwbook, hl-*, iso) + generated hardware configs
├── modules/ # Reusable NixOS and Home Manager modules
├── bin/ # `skyg` CLI (see bin/ABOUTME.md)
│ ├── skyg # Bash shim → NuShell modules in bin/lib/
│ ├── temp-monitor # CPU/GPU temperature logger (see TEMP_MONITOR_README.md)
│ └── lib/ # Command modules: os, remote, secrets, ca, pkgs, flake, build, render, hm, net
├── configs/ # App configs per host, plus configs/pki (lab TLS certs)
├── pkgs/ # Custom packages (see pkgs/ABOUTME.md)
├── hosts/ # One folder per host (fwbook, hl-*, iso) + disko/hardware files
├── modules/
│ ├── main.nix # Entry point that wires all modules together
│ ├── core/ # Core system modules
│ ├── nixos/ # NixOS modules (desktop, server, common)
│ ├── home/ # Home Manager modules
│ ├── nixos/ # NixOS-specific modules
│ └── *.nix # Utility modules (lib, skyg-utils, internal-networking, etc.)
│ ├── openwrt/ # OpenWrt config generator
│ └── *.nix # Shared helpers (lib, skyg-utils, internal-networking, …)
├── openwrt-routers/ # OpenWrt router configs (glmain)
├── secrets/ # agenix-encrypted secrets (keys listed in secrets.nix)
├── docs/ # Documentation
├── flake.nix # Nix flake definition
├── flake.lock # Locked dependency versions
└── README.md # This file
└── flake.nix # Flake definition
```
## Using This Flake
To use the custom packages in your own NixOS/Home Manager configuration:
Custom packages and helpers are exported for reuse:
```nix
{
inputs.nixos-setup.url = "github:skykanin/nixos-setup";
outputs = { self, nixpkgs, nixos-setup, ... }:
outputs = { nixos-setup, ... }:
let
system = "x86_64-linux";
pkgs = nixos-setup.lib.pkgs.${system};
pkgs = nixos-setup.lib.pkgs."x86_64-linux";
in {
environment.systemPackages = with pkgs; [
niri-touchscreen-gestures
];
environment.systemPackages = [ pkgs.niri-touchscreen-gestures ];
};
}
```
You can also import `nixos-setup.lib` to reuse `makeNixOs`, `makeHomeManagerUsers`, `makeIso`, `makeSdImage`, and other utilities.
`nixos-setup.lib` also provides `makeNixOs`, `makeHomeManagerUsers`, `makeIso`, `makeSdImage`, and more.
See [`pkgs/ABOUTME.md`](pkgs/ABOUTME.md) for details on each package.
Inside this repo, every package in `pkgs/` is available as `pkgs.<name>` through the overlay.
## Quick Start
## The `skyg` CLI
The `skyg` script is your main interface for managing these configurations. It's located in `bin/skyg` and uses NuShell. Run `skyg` with no arguments to list subcommands, or `skyg <subcommand> --help` for details.
`bin/skyg` is the main tool for this repo. Run `skyg` to list subcommands, or `skyg <subcommand> --help` for details.
### Available Commands
### Local system — `skyg os`
#### Local System (`skyg os`)
| Command | Description |
| -------------------------------------- | ---------------------------------------------------------------------------------- |
| `skyg os <action>` | Rebuild locally. Actions: `test`, `dry-activate`, `run`, `switch`, `build`, `boot` |
| `skyg os <action> --build-host <host>` | Build on another machine (e.g. `--build-host fwdesk`) |
| `skyg os rollback` | Go back to the previous generation |
- **`skyg os <action>`** - Run a local NixOS rebuild. Actions: `test`, `dry-activate`, `run`, `switch`, `build`, `boot`
- **`skyg os rollback`** - Roll back to the previous generation
- **`--build-host <host>`** - Build on a remote builder (e.g. `skyg os switch --build-host fwdesk`)
### Remote hosts — `skyg remote`
#### Remote Deployments (`skyg remote`)
| Command | Description |
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `skyg remote <action> <target>` | Deploy to a remote host. Same actions as `skyg os` |
| `skyg remote install <target>` | Fresh install via nixos-anywhere using `hosts/hl-<target>.disko.nix`. **Wipes disks.** Asks you to type the hostname; refuses if NixOS is already installed unless `--force-wipe` |
| `skyg remote status <target>` | Show one host's status |
| `skyg remote status --all` | Show all hosts: generation, pending reboot, needs rebuild |
| `skyg remote boot-all` | Run `boot` on every online remote (skips this machine) |
| `skyg remote reboot-pending` | Reboot hosts whose booted system differs from the current one, one at a time, after confirmation |
- **`skyg remote <command> <target>`** - Deploy to a remote machine
Example: `skyg remote switch bigbox1` deploys `hl-bigbox1` to `root@bigbox1.lab.internal`.
Supported remote commands: `test`, `dry-activate`, `run`, `switch`, `build`, `boot`
### Flake — `skyg flake`
Example: `skyg remote switch bigbox1` deploys using the `hl-bigbox1` profile to `root@bigbox1.lab.internal`
| Command | Description |
| --------------------------- | ---------------------------------------------------------- |
| `skyg flake update [input]` | Update all inputs, or one, then show the `flake.lock` diff |
| `skyg flake check` | Run `nix flake check --no-build` |
| `skyg flake check-versions` | Check that all inputs use the same NixOS release |
- **`skyg remote install <target>`** - Fresh-install a remote host via nixos-anywhere, using `hosts/hl-<target>.disko.nix`. Always wipes the disks in that file. Aborts if the disko file is missing, if the host already boots NixOS from disk (unless `--force-wipe`), or if you don't type the short hostname to confirm.
- **`skyg remote status <target>`** - Check status of a single remote host
- **`skyg remote status --all`** - Check status of all remote hosts (generation, pending reboot, needs rebuild)
- **`skyg remote boot-all`** - Boot all remote hosts (skips the current machine, checks online status first)
- **`skyg remote reboot-pending`** - Find every remote with a pending reboot (its booted system differs from its current system) and reboot them. Lists the affected hosts and asks for confirmation, then reboots them one at a time, waiting for each to come back online and sending a desktop notification when it does.
### Images and routers — `skyg build`
#### Flake Management (`skyg flake`)
| Command | Description |
| ----------------------------------------- | ------------------------------------------------------------------------------ |
| `skyg build image <iso\|pi1\|pi2>` | Build an ISO or a Pi SD card image |
| `skyg build openwrt [router] [--dry-run]` | Deploy a router config (default `glmain`). `--dry-run` only renders to `.tmp/` |
- **`skyg flake update [input]`** - Update all flakes, or a specific input (e.g. `skyg flake update nixpkgs`). Displays the diff of `flake.lock` after updating.
- **`skyg flake check`** - Run `nix flake check --no-build`
- **`skyg flake check-versions`** - Verify NixOS release version consistency across flake inputs
### Home Manager — `skyg hm`
#### Building Images and Routers (`skyg build`)
| Command | Description |
| -------------------------- | ----------------------------------------- |
| `skyg hm switch [profile]` | Apply Home Manager config (default `ari`) |
| `skyg hm build [profile]` | Build Home Manager config |
- **`skyg build image <iso|pi1|pi2>`** - Build a bootable image: ISO (`iso`) or Pi SD card image (`pi1`, `pi2`)
- **`skyg build openwrt [router]`** - Deploy an OpenWrt router config (default: `glmain`). Add `--dry-run` to render configs to `.tmp/` without touching the router.
### Secrets — `skyg secrets`
#### Home Manager (`skyg hm`)
| Command | Description |
| -------------------------------------------- | ----------------------------------------------- |
| `skyg secrets` / `skyg secrets list` | List secret names |
| `skyg secrets show <secret>` | Decrypt to `.tmp/unencrypted-<secret>` |
| `skyg secrets edit <secret> [file] [--yaml]` | Edit and re-encrypt (`--yaml` validates first) |
| `skyg secrets compare <secret>` | Diff the working copy against the stored secret |
- **`skyg hm switch [profile]`** - Apply home-manager configuration (default: `ari`)
- **`skyg hm build [profile]`** - Build home-manager configuration
### Lab CA — `skyg ca`
Example: `skyg hm switch ari` or `skyg hm switch`
| Command | Description |
| ------------------------------------- | --------------------------------------------------------------------------------------- |
| `skyg ca init` | Create the root CA: key → `secrets/lab-ca-key.age`, cert → `configs/pki/lab-ca.crt` |
| `skyg ca issue <domain> --for <host>` | Issue a TLS cert: cert → `configs/pki/<domain>.crt`, key → `secrets/<name>-tls-key.age` |
#### Secrets (`skyg secrets`)
### Custom packages — `skyg pkgs`
- **`skyg secrets list`** - List known secret names
- **`skyg secrets show <secret>`** - Decrypt a secret to `.tmp/unencrypted-<secret>`
- **`skyg secrets edit <secret> [--yaml]`** - Encrypt a working copy back into the secret
- **`skyg secrets compare <secret>`** - Diff the working copy against the stored secret
| Command | Description |
| ---------------------------------- | ----------------------------------------------- |
| `skyg pkgs update --all` | Update every package that has an `update.sh` |
| `skyg pkgs update <pkg> [version]` | Update one package (latest, or a given version) |
#### Lab CA (`skyg ca`)
### Network — `skyg net`
- **`skyg ca init`** - Generate the lab root CA: key → `secrets/lab-ca-key.age`, cert → `configs/pki/lab-ca.crt`
- **`skyg ca issue <domain> --for <host>`** - Mint a TLS leaf cert signed by the lab CA: cert → `configs/pki/<domain>.crt`, key → `secrets/<name>-tls-key.age`
| Command | Description |
| ------------------------- | -------------------------------------------------------------------------------------------- |
| `skyg net check [device]` | Show NIC info and run a speed test on every device (or one). `--no-speedtest` skips the test |
| `skyg net last` | Show the results of the last `skyg net check` |
#### Custom Packages (`skyg pkgs`)
### Other
- **`skyg pkgs update --all`** - Auto-detect the latest version for all packages that have `update.sh`
- **`skyg pkgs update <pkg>`** - Auto-detect the latest version for a single package
- **`skyg pkgs update <pkg> <version>`** - Bump a package to an explicit version
#### Other
- **`skyg profiles`** - List all available local profiles
- **`skyg profiles --only_remote`** - List only remote profiles (prefixed with `hl-`)
- **`skyg render html-tpl <file>`** - Render a Gitea `.tmpl` and serve it on `127.0.0.1` for preview. Foreground — Ctrl+C to stop.
## Usage Examples
```bash
# Check available profiles
skyg profiles
# Build and switch to new configuration
skyg os build
skyg os switch
# Test configuration before switching
skyg os test
# Update dependencies
skyg flake update nixpkgs
# Deploy to a remote server
skyg remote switch bigbox1
# Rollback if something goes wrong
skyg os rollback
# Apply home-manager changes
skyg hm switch
```
### Using Custom Packages
All packages from `pkgs/` are available in your configuration as `pkgs.<name>` thanks to the overlay.
Example:
```nix
environment.systemPackages = with pkgs; [ niri-touchscreen-gestures ];
```
See [`pkgs/ABOUTME.md`](pkgs/ABOUTME.md) for details on each package.
| Command | Description |
| ----------------------------- | ------------------------------------------------------- |
| `skyg profiles` | List all profiles |
| `skyg profiles true` | List only remote (`hl-*`) profiles |
| `skyg render html-tpl <file>` | Preview a Gitea `.tmpl` on `127.0.0.1` (Ctrl+C to stop) |
## Managing Secrets
Secrets are encrypted using [agenix](https://github.com/ryantm/agenix) and stored in `secrets/`.
Secrets are encrypted with [agenix](https://github.com/ryantm/agenix) and stored in `secrets/`.
### Adding a Host to Secrets
To give a new host access:
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-encrypt**: for each affected secret run `skyg secrets show <name>` then `skyg secrets edit <name>` to re-encrypt it against the updated key set
1. Get its key: `cat /etc/ssh/ssh_host_ed25519_key.pub`
2. Add it to `secrets.nix` and to each secret's `publicKeys`
3. Re-encrypt each affected secret: `skyg secrets show <name>`, then `skyg secrets edit <name>`
For more details, see `secrets/ABOUTME.md`.
See `secrets/ABOUTME.md` and `docs/agenix.md` for more.
## Host Profiles
Available profiles include:
- **Local**: `fwbook` (Framework laptop)
- **Remote**: `hl-bigbox1`, `hl-bigbox2`, `hl-fwdesk`, `hl-fws1`, `hl-minipc1`, `hl-minipc2`, `hl-minipc3`, `hl-pi1`, `hl-pi2`, `hl-terra1`
- **ISO**: `iso` (bootable image)
- **ISO**: `iso` (bootable installer)
All profiles automatically have access to the custom packages from the `pkgs/` directory.
See `docs/hosts/README.md` for per-host details.
+34 -28
View File
@@ -7,20 +7,23 @@ 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 $*"
├── check-flake-versions # Bash shim for `skyg flake check-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 # Dispatcher + bare `skyg` + `skyg profiles` + deprecated aliases
├── cmds.nu # Dispatcher + bare `skyg` + `skyg profiles`
├── os.nu # `skyg os` (local NixOS rebuild/switch/rollback)
├── remote.nu # `skyg remote *` (deploy, install, boot-all, status, reboot-pending)
├── secrets.nu # `skyg secrets list/show/edit/compare`
├── secrets.nu # `skyg secrets [list]/show/edit/compare`
├── ca.nu # `skyg ca init/issue`
├── buzz.nu # `skyg buzz identity`
├── pkgs.nu # `skyg pkgs update`
├── flake.nu # `skyg flake update/check/check-versions`
├── build.nu # `skyg build image/openwrt`
├── render.nu # `skyg render html-tpl`
├── hm.nu # `skyg hm <action>`
├── net.nu # `skyg net check` (per-device NIC info + shared-server speed test), `skyg net last`
├── net-nic.sh # Bash probe piped to each device by `skyg net check` (NIC model, driver, link/supported speeds)
├── helpers.nu # Shared helpers: REPO_ROOT const + internal functions
├── profile.nu # Profile helpers and tab-completion data
├── types.nu # Tab-completion completer functions
@@ -29,31 +32,34 @@ bin/
## Key Commands
| Command | Description |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `skyg os switch` | Rebuild and switch local system |
| `skyg os rollback` | Roll back to previous generation |
| `skyg remote switch <host>` | Deploy to a remote host |
| `skyg remote install <host>` | Fresh-install a remote host via nixos-anywhere, using `hosts/<profile>.disko.nix`. Always wipes the disks in that file. Aborts if the file is missing, if the host already boots NixOS from disk (unless `--force-wipe`), or if you do not type the short hostname. |
| `skyg remote status <host>` | Check status of a single remote host |
| `skyg remote status --all` | Check status of all remote hosts |
| `skyg remote boot-all` | Boot all remote hosts |
| `skyg remote reboot-pending` | Reboot every remote host with a pending reboot (`booted-system` != `current-system`). Lists them, asks for confirmation, then reboots one at a time, waiting for each to come back online and sending a desktop notification when it does. |
| `skyg hm switch` | Apply Home Manager config |
| `skyg flake update [input]` | Update flake inputs |
| `skyg flake check` | Run `nix flake check --no-build` |
| `skyg flake check-versions` | Verify NixOS release version consistency in flake.nix |
| `skyg build image iso\|pi1\|pi2` | Build bootable image — ISO (`iso`) or Pi SD card image (`pi1`, `pi2`) |
| `skyg build openwrt [router]` | Deploy OpenWrt config |
| `skyg profiles` | List valid local/remote profiles |
| `skyg secrets list` | List known secret names |
| `skyg secrets show <secret>` | Decrypt a secret to `.tmp/unencrypted-<secret>` |
| `skyg secrets edit <secret> [--yaml]` | Encrypt a working copy back into the secret |
| `skyg secrets compare <secret>` | Diff the working copy against the stored secret |
| `skyg ca init` | Generate the lab root CA: key → `secrets/lab-ca-key.age`, cert → `configs/pki/lab-ca.crt` (see `configs/pki/ABOUTME.md`) |
| `skyg ca issue <domain> --for <host>` | Mint a TLS leaf cert signed by the lab CA: cert → `configs/pki/<domain>.crt`, key → `secrets/<name>-tls-key.age`. Auto-registers missing `secrets.nix` entries. |
| `skyg pkgs update [--all\|<pkg>]` | Update one or all custom packages |
| `skyg render html-tpl <file>` | Render a Gitea `.tmpl` and serve it on `127.0.0.1` for preview. Foreground — Ctrl+C to stop. `<file>` tab-completes from `**/*.tmpl`. |
| Command | Description |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `skyg os switch` | Rebuild and switch local system |
| `skyg os rollback` | Roll back to previous generation |
| `skyg remote switch <host>` | Deploy to a remote host |
| `skyg remote install <host>` | Fresh-install a remote host via nixos-anywhere, using `hosts/<profile>.disko.nix`. Always wipes the disks in that file. Aborts if the file is missing, if the host already boots NixOS from disk (unless `--force-wipe`), or if you do not type the short hostname. |
| `skyg remote status <host>` | Check status of a single remote host: booted / current / next-boot generation. `reboot_pending` = booted != next boot (`/nix/var/nix/profiles/system`), `needs_build` = local build != next boot (or `"unknown"` if the local eval fails). So hosts deployed with `boot` show up correctly. |
| `skyg remote status --all` | Check status of all remote hosts |
| `skyg remote boot-all` | Boot all remote hosts |
| `skyg remote reboot-pending` | Reboot every remote host with a pending reboot (`booted-system` != next-boot generation, so `boot` deploys count). Lists them, asks for confirmation, then reboots one at a time. Each host must prove it rebooted (boot id changed) and come back on its next-boot generation, otherwise it is reported as failed. Sends a desktop notification per host. |
| `skyg hm switch` | Apply Home Manager config |
| `skyg flake update [input]` | Update flake inputs |
| `skyg flake check` | Run `nix flake check --no-build` |
| `skyg flake check-versions` | Verify NixOS release version consistency in flake.nix |
| `skyg build image iso\|pi1\|pi2` | Build bootable image — ISO (`iso`) or Pi SD card image (`pi1`, `pi2`) |
| `skyg build openwrt [router]` | Deploy OpenWrt config |
| `skyg profiles` | List valid local/remote profiles |
| `skyg secrets list` | List known secret names |
| `skyg secrets show <secret>` | Decrypt a secret to `.tmp/unencrypted-<secret>` |
| `skyg secrets edit <secret> [--yaml]` | Encrypt a working copy back into the secret |
| `skyg secrets compare <secret>` | Diff the working copy against the stored secret |
| `skyg ca init` | Generate the lab root CA: key → `secrets/lab-ca-key.age`, cert → `configs/pki/lab-ca.crt` (see `configs/pki/ABOUTME.md`) |
| `skyg ca issue <domain> --for <host>` | Mint a TLS leaf cert signed by the lab CA: cert → `configs/pki/<domain>.crt`, key → `secrets/<name>-tls-key.age`. Auto-registers missing `secrets.nix` entries. |
| `skyg buzz identity <robot>` | Make a Buzz (Nostr) identity for a robot's Hermes agent and merge `BUZZ_RELAY_URL` / `BUZZ_PRIVATE_KEY` (plus optional `--channels`, `--home-channel`). The bot answers anyone on the relay by default (`BUZZ_ALLOW_ALL_USERS=true`); `--allowed-users <npubs>` limits it to a list, `--restricted` allows no one into `secrets/robots-<robot>.age`, keeping its other lines. Refuses to replace an existing key without `--rotate`. `--dry-run` only shows the npub. Prints the `buzz-manage add-member <npub>` step. Needs `nak` (dev shell). |
| `skyg pkgs update [--all\|<pkg>]` | Update one or all custom packages |
| `skyg net check [device]` | For every managed device (or just `[device]`): report the NIC on the default route (model, driver, current link speed, supported speeds), then run `speedtest-go` via `nix-shell` against one shared server. Logs progress per device and returns a table. `--server <id>` picks the server; `--no-speedtest` skips the test. Offline devices are listed, not tested. Every run saves the table to `.tmp/net-checks/<timestamp>.nuon`; `--save <file>` also writes it to `<file>` (format from extension). The server is saved in `.tmp/net-checks/server.nuon` on first run; later runs ask whether to change it (fuzzy pick list from `speedtest-go --list`). `--server` skips the question and leaves the saved server alone. |
| `skyg net last` | Show the table from the most recent `skyg net check` run (newest file in `.tmp/net-checks/`). |
| `skyg render html-tpl <file>` | Render a Gitea `.tmpl` and serve it on `127.0.0.1` for preview. Foreground — Ctrl+C to stop. `<file>` tab-completes from `**/*.tmpl`. |
## Agent Note
-4
View File
@@ -1,4 +0,0 @@
#!/usr/bin/env bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
LIB="$SCRIPT_DIR/lib/cmds.nu"
exec nu --commands "use \"$LIB\" *; skyg flake check-versions"
+109
View File
@@ -0,0 +1,109 @@
use types.nu *
use helpers.nu *
# Same host as RELAY_URL in hosts/hl-minipc1/services/buzz.nix (public domain).
const BUZZ_DEFAULT_RELAY = "https://buzz.home.sosnovsky.ca"
# Robots that have a secrets/robots-<name>.age (robots-shared is not a robot).
def buzz-robots [] {
secret-names
| where {|s| ($s | str starts-with "robots-") and $s != "robots-shared" }
| each {|s| $s | str replace "robots-" "" }
}
# Drop existing KEY=... lines for the keys in `vars` and in `drop`, then append
# the new values. Every other line is kept as is.
def env-merge [lines: list<string>, vars: record, drop: list<string>] {
let keys = (($vars | columns) ++ $drop)
let kept = ($lines | where {|l|
let t = ($l | str trim)
not ($keys | any {|k| $t | str starts-with $"($k)=" })
})
$kept ++ ($vars | items {|k, v| $"($k)=($v)" })
}
# Make a Buzz (Nostr) identity for a robot's Hermes agent and write the BUZZ_*
# env vars into secrets/robots-<robot>.age. Other lines in the secret are kept.
# By default the bot answers anyone on the relay (BUZZ_ALLOW_ALL_USERS=true).
# Pass --allowed-users for an explicit list, or --restricted for no one.
# The nsec is never printed. Afterwards, add the printed npub to the relay.
export def "skyg buzz identity" [
robot: string@buzz-robots # Robot name (secret: secrets/robots-<robot>.age)
--relay: string # BUZZ_RELAY_URL (default: the lab relay)
--allowed-users: string # Only these answer: comma-separated npubs or hex pubkeys (BUZZ_ALLOWED_USERS)
--restricted # Neither allow-all nor a list is set: the bot ignores everyone until you add one
--channels: string # BUZZ_CHANNELS: comma-separated channel UUIDs
--home-channel: string # BUZZ_HOME_CHANNEL: channel UUID for cron/notifications
--rotate # Replace an existing BUZZ_PRIVATE_KEY (loses relay membership)
--dry-run # Make a key and show the npub; do not touch the secret
] {
cd $REPO_ROOT
if (which nak | is-empty) {
error make {msg: "nak not found — run inside the dev shell (nix develop)"}
}
let secret = $"secrets/robots-($robot).age"
let relay_url = ($relay | default $BUZZ_DEFAULT_RELAY | str trim --right --char "/")
# Read the current secret first, so we fail before making anything.
mut existing = []
if not $dry_run {
if not ($secret | path exists) {
error make {msg: $"($secret) not found — create it first (skyg secrets edit robots-($robot))"}
}
$existing = (^agenix -d $secret | lines)
let has_key = ($existing | any {|l| ($l | str trim) | str starts-with "BUZZ_PRIVATE_KEY=" })
if $has_key and not $rotate {
error make {msg: $"($secret) already has BUZZ_PRIVATE_KEY. Use --rotate to replace it (the robot gets a new identity and must be re-added to the relay)."}
}
}
let hex = (^nak key generate | str trim)
let pubhex = (^nak key public $hex | str trim)
let nsec = (^nak encode nsec $hex | str trim)
let npub = (^nak encode npub $pubhex | str trim)
let ok = ($nsec | str starts-with "nsec1") and ($npub | str starts-with "npub1")
if not $ok {
error make {msg: "nak returned an unexpected key format; nothing was written"}
}
mut vars = {BUZZ_RELAY_URL: $relay_url, BUZZ_PRIVATE_KEY: $nsec}
if ($allowed_users | is-not-empty) { $vars = ($vars | insert BUZZ_ALLOWED_USERS $allowed_users) }
if ($channels | is-not-empty) { $vars = ($vars | insert BUZZ_CHANNELS $channels) }
if ($home_channel | is-not-empty) { $vars = ($vars | insert BUZZ_HOME_CHANNEL $home_channel) }
# Allow-all is the default; a list or --restricted turns it off (and clears a stale true).
mut drop = []
if ($allowed_users | is-not-empty) {
$vars = ($vars | insert BUZZ_ALLOWED_USERS $allowed_users)
$drop = ["BUZZ_ALLOW_ALL_USERS"]
} else if $restricted {
$drop = ["BUZZ_ALLOW_ALL_USERS"]
} else {
$vars = ($vars | insert BUZZ_ALLOW_ALL_USERS "true")
}
if $dry_run {
print $"Dry run: nothing written. Would set in ($secret):"
print ($vars | columns | each {|k| $" ($k)" } | str join "\n")
if ($drop | is-not-empty) { print $"Would remove: ($drop | str join ', ')" }
print $"npub: ($npub)"
return
}
# Only --restricted can leave nobody allowed.
let gated = (
($allowed_users | is-not-empty)
or ($existing | any {|l| ($l | str trim) | str starts-with "BUZZ_ALLOWED_USERS=" })
)
# Straight into agenix over stdin: no plaintext file on disk.
let body = ((env-merge $existing $vars $drop) | str join "\n") + "\n"
$body | ^agenix -e $secret
print $"✅ Updated ($secret) with: ($vars | columns | str join ', ')"
print $"npub: ($npub)"
print "Next:"
print $" 1. On hl-minipc1: sudo buzz-manage add-member ($npub)"
if $restricted and not $gated {
print "⚠️ --restricted with no BUZZ_ALLOWED_USERS: the bot will ignore everyone. Re-run with --rotate --allowed-users <npub,...> or edit the secret."
}
}
+2 -59
View File
@@ -5,11 +5,13 @@ export use remote.nu *
export use os.nu *
export use secrets.nu *
export use ca.nu *
export use buzz.nu *
export use pkgs.nu *
export use flake.nu *
export use build.nu *
export use render.nu *
export use hm.nu *
export use net.nu *
export def skyg [] {
print $REPO_ROOT
@@ -28,62 +30,3 @@ export def "skyg profiles" [only_remote: bool = false] {
valid_profiles | print
}
}
# --- Deprecated aliases (backward compatibility) ---
export def "skyg decrypt" [secret: string@secret-names] {
print $"(ansi yellow)Deprecated: use `skyg secrets show` instead(ansi reset)"
skyg secrets show $secret
}
export def "skyg encrypt" [
secret: string@secret-names,
source?: string,
--yaml
] {
print $"(ansi yellow)Deprecated: use `skyg secrets edit` instead(ansi reset)"
skyg secrets edit $secret $source --yaml=$yaml
}
export def "skyg compare-secret" [secret: string@secret-names] {
print $"(ansi yellow)Deprecated: use `skyg secrets compare` instead(ansi reset)"
skyg secrets compare $secret
}
export def "skyg secrets" [] {
print $"(ansi yellow)Deprecated: use `skyg secrets list` instead(ansi reset)"
skyg secrets list
}
export def "skyg rollback" [] {
print $"(ansi yellow)Deprecated: use `skyg os rollback` instead(ansi reset)"
skyg os rollback
}
export def "skyg update" [input_name?: string] {
print $"(ansi yellow)Deprecated: use `skyg flake update` instead(ansi reset)"
skyg flake update $input_name
}
export def "skyg check" [] {
print $"(ansi yellow)Deprecated: use `skyg flake check` instead(ansi reset)"
skyg flake check
}
export def "skyg check-flake-versions" [] {
print $"(ansi yellow)Deprecated: use `skyg flake check-versions` instead(ansi reset)"
skyg flake check-versions
}
export def "skyg build-image" [target: string] {
print $"(ansi yellow)Deprecated: use `skyg build image` instead(ansi reset)"
skyg build image $target
}
export def "skyg openwrt" [
router?: string,
--dry-run
] {
print $"(ansi yellow)Deprecated: use `skyg build openwrt` instead(ansi reset)"
skyg build openwrt $router --dry-run=$dry_run
}
+63
View File
@@ -0,0 +1,63 @@
#!/usr/bin/env bash
# Probe the network card a host uses for internet traffic.
# Piped to `bash -s` locally or over SSH by `skyg net check` (bin/lib/net.nu).
# Prints KEY=VALUE lines; empty values mean "unknown".
set -u
et() {
if command -v ethtool >/dev/null 2>&1; then
ethtool "$@"
else
nix-shell -p ethtool --run "ethtool $*"
fi
}
is_phys() { [ -e "/sys/class/net/$1/device" ]; }
# Interface on the default route (may be a bridge or other virtual device).
iface=$(ip -4 route show default 2>/dev/null | awk '{for (i = 1; i <= NF; i++) if ($i == "dev") { print $(i + 1); exit }}')
nic="$iface"
# Follow a bridge/virtual interface down to a physical port.
if [ -n "$nic" ] && ! is_phys "$nic"; then
for p in /sys/class/net/"$nic"/brif/* /sys/class/net/"$nic"/lower_*; do
[ -e "$p" ] || continue
c=$(basename "$p")
c=${c#lower_}
if is_phys "$c"; then nic="$c"; break; fi
done
fi
# Fallback: first physical interface that is up.
if [ -z "$nic" ] || ! is_phys "$nic"; then
nic=""
for d in /sys/class/net/*; do
n=$(basename "$d")
if is_phys "$n" && [ "$(cat "$d/operstate" 2>/dev/null)" = "up" ]; then nic="$n"; break; fi
done
fi
echo "IFACE=$iface"
echo "NIC=$nic"
[ -n "$nic" ] || exit 0
if [ -d "/sys/class/net/$nic/wireless" ] || [ -e "/sys/class/net/$nic/phy80211" ]; then
echo "TYPE=wifi"
else
echo "TYPE=ethernet"
fi
echo "DRIVER=$(basename "$(readlink -f "/sys/class/net/$nic/device/driver" 2>/dev/null)" 2>/dev/null)"
echo "LINK=$(cat "/sys/class/net/$nic/speed" 2>/dev/null)"
props=$(udevadm info -q property -p "/sys/class/net/$nic" 2>/dev/null)
echo "VENDOR=$(printf '%s\n' "$props" | sed -n 's/^ID_VENDOR_FROM_DATABASE=//p' | head -1)"
echo "MODEL=$(printf '%s\n' "$props" | sed -n 's/^ID_MODEL_FROM_DATABASE=//p' | head -1)"
# Speeds from ethtool's "Supported link modes" block, e.g. "10 100 1000 2500".
supported=$(et "$nic" 2>/dev/null \
| awk '/Supported link modes:/ { f = 1; sub(/.*Supported link modes:/, "") }
/Supported pause frame use:|Supports auto-negotiation:/ { f = 0 }
f { print }' \
| grep -oE '[0-9]+base' | grep -oE '^[0-9]+' | sort -n | uniq | tr '\n' ' ')
echo "SUPPORTED=${supported% }"
+236
View File
@@ -0,0 +1,236 @@
use profile.nu *
use helpers.nu [REPO_ROOT]
const NIC_SCRIPT = path self | path dirname | path join "net-nic.sh"
const SSH_OPTS = ["-o" "BatchMode=yes" "-o" "ConnectTimeout=5" "-o" "StrictHostKeyChecking=accept-new"]
const CHECKS_DIR = $REPO_ROOT | path join ".tmp" "net-checks"
const SERVER_CACHE = $CHECKS_DIR | path join "server.nuon"
def local-hostname [] {
^cat /proc/sys/kernel/hostname | str trim
}
# Devices `skyg net check` can test: every remote (hl-*) profile, plus this machine if it is a profile.
export def net-targets [] {
let local = (local-hostname)
valid_profiles
| each {|p|
if ($p | str starts-with "hl-") {
$p | str replace "hl-" ""
} else if $p == $local {
$p
} else {
null
}
}
| compact
}
def is-local [device: string] {
let local = (local-hostname)
$device == $local or $"hl-($device)" == $local
}
# Run a bash script on a device (locally or over SSH) and return the `complete` record.
def run-on [device: string, script: string] {
if (is-local $device) {
$script | ^bash -s | complete
} else {
$script | ^ssh ...$SSH_OPTS $"root@($device).lab.internal" bash -s | complete
}
}
def is-online [device: string] {
if (is-local $device) { return true }
(^ssh ...$SSH_OPTS $"root@($device).lab.internal" true | complete | get exit_code) == 0
}
def to-int-or-null [v] {
if ($v | is-empty) { return null }
try {
let n = ($v | into int)
if $n > 0 { $n } else { null }
} catch { null }
}
def bps-to-mbps [v] {
if $v == null { null } else { ($v * 8 / 1_000_000) | math round --precision 1 }
}
# Read the device's network card details via net-nic.sh (KEY=VALUE lines -> record).
def probe-nic [device: string] {
let r = (run-on $device (^cat $NIC_SCRIPT))
$r.stdout
| lines
| parse --regex '^(?P<key>[A-Z]+)=(?P<value>.*)$'
| reduce --fold {} {|it, acc| $acc | upsert $it.key ($it.value | str trim) }
}
# Nearby speedtest.net servers as [{id, rest}], closest first.
def list-servers [] {
let r = (^bash -c "nix-shell -p speedtest-go --run 'speedtest-go --list'" | complete)
$r.stdout
| lines
| parse --regex '^\[(?P<id>\d+)\]\s+(?P<rest>.*)$'
}
def save-server [s: record] {
mkdir $CHECKS_DIR
$s | save --force $SERVER_CACHE
}
# Server id to use for all devices: the saved one (asks if you want to change it),
# or the closest one on first run. Returns "" if none could be found.
def pick-server [] {
# ^cat, not open: open may be aliased (e.g. to xdg-open) in the user's config.
let saved = if ($SERVER_CACHE | path exists) { try { ^cat $SERVER_CACHE | from nuon } catch { null } } else { null }
if $saved == null {
print "Finding the closest speedtest server (shared by all devices)..."
let s = (list-servers | get 0?)
if $s == null {
print $"(ansi yellow)Could not list servers; each device will pick its own.(ansi reset)"
return ""
}
save-server $s
print $"Using server ($s.id): ($s.rest) \(saved to ($SERVER_CACHE)\)"
return $s.id
}
print $"Saved server ($saved.id): ($saved.rest)"
let ans = (input "Change server? [y/N] " | str trim | str downcase)
if $ans not-in ["y" "yes"] { return $saved.id }
print "Listing speedtest servers..."
let servers = (list-servers)
if ($servers | is-empty) {
print $"(ansi yellow)Could not list servers; keeping saved server.(ansi reset)"
return $saved.id
}
let s = ($servers | input list --fuzzy --display {|x| $"[($x.id)] ($x.rest)" } "Pick a server (closest first)")
if $s == null {
print "No server picked; keeping saved server."
return $saved.id
}
save-server $s
print $"Using server ($s.id): ($s.rest)"
$s.id
}
# Run speedtest-go on a device. Assumes dl_speed/ul_speed are bytes/s and latency is ns.
def run-speedtest [device: string, server: string] {
let srv = if $server == "" { "" } else { $"--server ($server)" }
let r = (run-on $device $"timeout 600 nix-shell -p speedtest-go --run 'speedtest-go ($srv) --json'")
let json_line = ($r.stdout | lines | where {|l| $l | str starts-with "{" } | reverse | get 0?)
let s = if $json_line == null { null } else {
try { $json_line | from json | get servers.0 } catch { null }
}
if $s == null {
let err = ($r.stderr | lines | where {|l| $l != "" } | last 1 | str join)
return {ok: false, error: (if $err == "" { $"exit code ($r.exit_code)" } else { $err })}
}
{
ok: true
server: $"($s.id? | default '?') ($s.name? | default '') / ($s.sponsor? | default '')"
ping_ms: (if $s.latency? == null { null } else { ($s.latency / 1_000_000) | math round --precision 1 })
down_mbps: (bps-to-mbps $s.dl_speed?)
up_mbps: (bps-to-mbps $s.ul_speed?)
}
}
def empty-row [device: string, status: string] {
{
host: $device, status: $status, iface: "", nic: "", type: "", model: "", driver: ""
link_mbps: null, supported_mbps: "", max_mbps: null
server: null, ping_ms: null, down_mbps: null, up_mbps: null
}
}
# Check each managed device's network card and run a speed test against one shared server.
export def "skyg net check" [
device?: string@net-targets, # Only check this device (default: all devices)
--server: string = "", # speedtest.net server id (default: closest to this machine)
--no-speedtest, # Only report network card details
--save: path, # Also save the table here (format from extension: .csv, .json, .nuon, .md, ...)
] {
let all = (net-targets)
let devices = if $device == null { $all } else {
if not ($device in $all) {
error make {msg: $"Unknown device '($device)'. Valid devices: ($all | str join ', ')"}
}
[$device]
}
let server_id = if (not $no_speedtest) and $server == "" { pick-server } else { $server }
let total = ($devices | length)
mut rows = []
for it in ($devices | enumerate) {
let d = $it.item
let tag = $"[($it.index + 1)/($total)] ($d)"
print $"($tag): checking reachability..."
if not (is-online $d) {
print $"($tag): (ansi yellow)OFFLINE(ansi reset)"
$rows = ($rows | append (empty-row $d "offline"))
continue
}
print $"($tag): reading network card..."
let nic = (probe-nic $d)
let supported = ($nic.SUPPORTED? | default "" | split row " " | where {|x| $x != "" })
let max = if ($supported | is-empty) { null } else { $supported | each {|x| $x | into int } | math max }
let model = ([($nic.VENDOR? | default "") ($nic.MODEL? | default "")] | where {|x| $x != "" } | str join " ")
mut row = (empty-row $d "online" | merge {
iface: ($nic.IFACE? | default "")
nic: ($nic.NIC? | default "")
type: ($nic.TYPE? | default "")
model: $model
driver: ($nic.DRIVER? | default "")
link_mbps: (to-int-or-null ($nic.LINK? | default ""))
supported_mbps: ($supported | str join " ")
max_mbps: $max
})
print $"($tag): ($row.nic) \(($row.type)\) ($model) | link ($row.link_mbps | default '?') Mbps | supports up to ($max | default '?') Mbps"
if not $no_speedtest {
print $"($tag): running speedtest-go \(first run may download it via nix-shell\)..."
let st = (run-speedtest $d $server_id)
if $st.ok {
$row = ($row | merge ($st | reject ok))
print $"($tag): (ansi green)down ($st.down_mbps) Mbps, up ($st.up_mbps) Mbps, ping ($st.ping_ms) ms(ansi reset)"
} else {
$row = ($row | upsert status "speedtest failed")
print $"($tag): (ansi red)speedtest failed: ($st.error)(ansi reset)"
}
}
$rows = ($rows | append $row)
}
print $"Done: checked ($total) device\(s\)."
mkdir $CHECKS_DIR
let auto_file = ($CHECKS_DIR | path join $"(date now | format date '%Y.%m.%d_%H_%M_%S').nuon")
$rows | save --force $auto_file
print $"Saved to ($auto_file)"
if $save != null {
$rows | save --force $save
print $"Saved to ($save | path expand)"
}
print $"Show the last table again with: (ansi green_bold)skyg net last(ansi reset)"
$rows
}
# Show the table from the most recent `skyg net check` run.
export def "skyg net last" [] {
# glob and ^cat, not ls/open: they may be aliased (e.g. to eza/xdg-open) in the user's config.
let files = (glob ($CHECKS_DIR | path join "*.nuon") | where {|f| $f != $SERVER_CACHE })
if ($files | is-empty) {
error make {msg: $"No saved net checks in ($CHECKS_DIR). Run `skyg net check` first."}
}
let latest = ($files | sort | last)
print $"From ($latest)"
^cat $latest | from nuon
}
+38 -14
View File
@@ -140,7 +140,7 @@ Starting parallel boots (concurrency: 2)..."
let boot_results = ($online_hosts | par-each --threads 1 { |host|
let target_host = $"root@($host).lab.internal"
let profile = $"hl-($host)"
let runcmd = $"nh os boot --target-host ($target_host) .#($profile)"
let runcmd = $"nh os boot --no-nom --target-host ($target_host) .#($profile)"
print $runcmd
let ok = (try {
bash -c $runcmd
@@ -212,9 +212,15 @@ export def "skyg remote status-all" [] {
# Print each host's status as one block, as soon as it finishes.
let booted = (if ($info.booted | is-empty) { "-" } else { $info.booted | path basename })
let current = (if ($info.current | is-empty) { "-" } else { $info.current | path basename })
let next_boot = (if ($info.next_boot | is-empty) { "-" } else { $info.next_boot | path basename })
let reboot_line = if $info.reboot_pending { $"(ansi yellow)REBOOT PENDING(ansi reset)\n" } else { "" }
let build_line = if $info.needs_build { $"(ansi red)NEEDS NEW BUILD(ansi reset)" } else { $"(ansi green)UP TO DATE(ansi reset)" }
print $"($host) | Booted: ($booted) | Current: ($current)"
# needs_build is true, false, or "unknown" (local eval failed)
let build_line = match $info.needs_build {
true => $"(ansi red)NEEDS NEW BUILD(ansi reset)",
false => $"(ansi green)UP TO DATE(ansi reset)",
_ => $"(ansi yellow)BUILD UNKNOWN (eval failed)(ansi reset)",
}
print $"($host) | Booted: ($booted) | Current: ($current) | Next boot: ($next_boot)\n ($reboot_line)($build_line)"
$info
})
@@ -222,7 +228,7 @@ export def "skyg remote status-all" [] {
return ($results | select host status reboot_pending needs_build)
}
# Reboot every remote host that is pending a reboot (booted-system != current-system).
# Reboot every remote host that is pending a reboot (booted-system != next-boot generation).
# Detects pending hosts, lists them, asks for confirmation, then reboots each one at a
# time, waiting for it to come back online and sending a desktop notification when it does.
export def "skyg remote reboot-pending" [] {
@@ -253,15 +259,14 @@ export def "skyg remote reboot-pending" [] {
}
let info = (try {
let booted = bash -c $"ssh -o BatchMode=yes ($target) 'readlink /run/booted-system' 2>/dev/null" | str trim
let current = bash -c $"ssh -o BatchMode=yes ($target) 'readlink /run/current-system' 2>/dev/null" | str trim
{booted: $booted, current: $current, pending: ($booted != $current)}
let s = (get-boot-state $target)
{booted: $s.booted, next_boot: $s.next_boot, pending: ($s.booted != "" and $s.booted != $s.next_boot)}
} catch {
{booted: "", current: "", pending: false}
{booted: "", next_boot: "", pending: false}
})
if $info.pending {
print $"(ansi blue)REBOOT PENDING(ansi reset): ($host) booted=($info.booted | path basename) current=($info.current | path basename)"
print $"(ansi blue)REBOOT PENDING(ansi reset): ($host) booted=($info.booted | path basename) next=($info.next_boot | path basename)"
$pending = ($pending | append $host)
} else {
print $"(ansi green)UP TO DATE(ansi reset): ($host)"
@@ -320,12 +325,31 @@ export def "skyg remote reboot-pending" [] {
let boot_id_after = (try {
bash -c $"ssh -o BatchMode=yes ($target) 'cat /proc/sys/kernel/random/boot_id' 2>/dev/null" | str trim
} catch { "" })
let confirmed = ($boot_id_before != "" and $boot_id_after != "" and $boot_id_before != $boot_id_after)
if $confirmed {
print $"(ansi green)($host) is back online (reboot confirmed)(ansi reset)"
# Proof of reboot: boot id changed. If we can't read it, fall back to "it went offline".
let did_reboot = if $boot_id_before != "" and $boot_id_after != "" {
$boot_id_before != $boot_id_after
} else {
print $"(ansi green)($host) is back online(ansi reset)"
$went_down
}
if not $did_reboot {
print $"(ansi red)($host) answered but did NOT reboot (same boot id, never went offline)(ansi reset)"
notify $"❌ ($host) did not reboot" "Reboot command had no effect"
$failed = ($failed | append $host)
continue
}
# Check the host really came up on the generation we wanted.
let after = (try { get-boot-state $target } catch { null })
if $after != null and $after.booted != $after.next_boot {
print $"(ansi red)($host) rebooted but is NOT on its latest generation(ansi reset)"
print $" booted=($after.booted | path basename)"
print $" wanted=($after.next_boot | path basename)"
notify $"⚠️ ($host) wrong generation" "Rebooted but not on the latest generation"
$failed = ($failed | append $host)
continue
}
print $"(ansi green)($host) rebooted and is back online(ansi reset)"
notify $"✅ ($host) rebooted" "Back online and reachable"
$rebooted = ($rebooted | append $host)
} else {
@@ -342,7 +366,7 @@ export def "skyg remote reboot-pending" [] {
Total hosts considered: ($all_hosts | length)
Pending reboot: ($pending | length) - ($pending | str join ', ')
Rebooted: ($rebooted | length) - ($rebooted | str join ', ')
Failed to return: ($failed | length) - ($failed | str join ', ')
Failed: ($failed | length) - ($failed | str join ', ')
Offline: ($offline | length) - ($offline | str join ', ')
Up to date: ($up_to_date | length) - ($up_to_date | str join ', ')
"
+26 -10
View File
@@ -1,6 +1,19 @@
use types.nu *
use profile.nu *
# Read the 3 system paths on a remote host:
# booted = what it booted from
# current = what is running now (changed by switch/test)
# next_boot = what the next reboot will use (changed by switch/boot)
export def get-boot-state [target: string] {
let lines = (bash -c $"ssh -o BatchMode=yes ($target) 'readlink /run/booted-system; readlink /run/current-system; readlink -f /nix/var/nix/profiles/system' 2>/dev/null" | lines)
let booted = ($lines | get 0? | default "")
let current = ($lines | get 1? | default "")
let profile = ($lines | get 2? | default "")
let next_boot = if $profile == "" { $current } else { $profile }
{booted: $booted, current: $current, next_boot: $next_boot}
}
export def get-remote-boot-info [ host: string@remote_targets ] {
let target = $"root@($host).lab.internal"
let is_online = (try {
@@ -8,13 +21,13 @@ export def get-remote-boot-info [ host: string@remote_targets ] {
true
} catch { false })
if (not $is_online) {
return {host: $host, status: "offline", booted: "", current: "", reboot_pending: false, needs_build: false, local_toplevel: ""}
return {host: $host, status: "offline", booted: "", current: "", next_boot: "", reboot_pending: false, needs_build: false, local_toplevel: ""}
}
return (try {
# Fetch remote system paths and the local toplevel concurrently.
let fetched = (["remote" "local"] | par-each {|what|
if $what == "remote" {
bash -c $"ssh ($target) 'readlink /run/booted-system; readlink /run/current-system' 2>/dev/null" | lines
get-boot-state $target
} else {
try {
bash -c $"nix eval --raw '.#nixosConfigurations.hl-($host).config.system.build.toplevel.outPath' 2>/dev/null || true" | str trim
@@ -22,22 +35,25 @@ export def get-remote-boot-info [ host: string@remote_targets ] {
}
})
let booted = ($fetched.0 | get 0? | default "")
let current = ($fetched.0 | get 1? | default "")
let state = $fetched.0
let booted = $state.booted
let current = $state.current
let next_boot = $state.next_boot
let local_toplevel = $fetched.1
let reboot_pending = ($booted != $current)
let needs_build = if $local_toplevel == "" { "unknown" } else { $local_toplevel != $current }
# A reboot only matters if it would land on a different system than we booted.
let reboot_pending = ($booted != "" and $booted != $next_boot)
let needs_build = if $local_toplevel == "" { "unknown" } else { $local_toplevel != $next_boot }
{host: $host, status: "online", booted: $booted, current: $current, reboot_pending: $reboot_pending, needs_build: $needs_build, local_toplevel: $local_toplevel}
{host: $host, status: "online", booted: $booted, current: $current, next_boot: $next_boot, reboot_pending: $reboot_pending, needs_build: $needs_build, local_toplevel: $local_toplevel}
} catch {
{host: $host, status: "error", booted: "", current: "", reboot_pending: false, needs_build: false, local_toplevel: ""}
{host: $host, status: "error", booted: "", current: "", next_boot: "", reboot_pending: false, needs_build: false, local_toplevel: ""}
})
}
# Poll SSH until the host reaches the desired reachability, or the timeout elapses.
def wait-for-host [target: string, want_online: bool, timeout: int] {
export def wait-for-host [target: string, want_online: bool, timeout: int] {
let deadline = (date now) + ($timeout * 1sec)
while (date now) < $deadline {
let online = (try {
@@ -53,7 +69,7 @@ def wait-for-host [target: string, want_online: bool, timeout: int] {
}
# Send a desktop notification if notify-send is available; never fail the caller.
def notify [title: string, body: string] {
export def notify [title: string, body: string] {
try {
^notify-send $title $body
} catch { }
+5
View File
@@ -1,6 +1,11 @@
use types.nu *
use helpers.nu *
# List all secret names (same as `skyg secrets list`)
export def "skyg secrets" [] {
skyg secrets list
}
# List all secret names
export def "skyg secrets list" [] {
secret-names
+5 -4
View File
@@ -23,10 +23,11 @@ these cases where the source subdir and `~/.config` target differ.
| `hl-fws1/hypr/` | Hyprland config for `hl-fws1` (remote slim desktop); **baked into the build** via `mountAsSource`, linked to `~/.config/hypr` |
| `hl-pi1/quickshell/` | Quickshell configs for `hl-pi1` (full-screen clock + calendar); linked to `~/.config/quickshell` |
| `fwbook/quickshell/` | Quickshell configs for `fwbook` (scrolling overview); linked to `~/.config/quickshell` |
| `extra.nu` | Extra NuShell config sourced at shell startup |
| `fwbook.knsv` | fwbook-specific Kanshi display profile |
| `hypr-types/hl.lua` | Shared EmmyLua type stubs for the `hl` global; each host's Hyprland `.luarc.json` points here via `workspace.library` |
| `pki/` | Public certs of the lab internal CA (`lab-ca.crt` + issued leaves), managed by `skyg ca`; **not** symlinked to `~/.config` — see `pki/ABOUTME.md` |
| `extra.nu` | Extra NuShell config sourced at shell startup |
| `fwbook.knsv` | fwbook-specific Kanshi display profile |
| `hypr-types/hl.lua` | Shared EmmyLua type stubs for the `hl` global; each host's Hyprland `.luarc.json` points here via `workspace.library` |
| `pki/` | Public certs of the lab internal CA (`lab-ca.crt` + issued leaves), managed by `skyg ca`; **not** symlinked to `~/.config` — see `pki/ABOUTME.md` |
## Notes
+4 -3
View File
@@ -2,10 +2,11 @@
-- Autostart
-- =========================
local function autostart()
-- hl.exec_cmd("setpriv --ambient-caps -all -- noctalia")
hl.exec_cmd("setpriv --ambient-caps -all -- omarchy-launch-shell")
hl.exec_cmd("setpriv --ambient-caps -all -- qs -c overview")
hl.exec_cmd("setpriv --ambient-caps -all -- noctalia")
-- hl.exec_cmd("setpriv --ambient-caps -all -- omarchy-launch-shell")
-- hl.exec_cmd("setpriv --ambient-caps -all -- qs -c overview")
hl.exec_cmd("setpriv --ambient-caps -all -- skygqts workspace-manager")
hl.exec_cmd("setpriv --ambient-caps -all -- skygqts workspace-badge")
end
hl.on("hyprland.start", autostart)
hl.bind("SUPER + SHIFT + A", autostart)
+4 -2
View File
@@ -12,7 +12,7 @@ hl.bind(mod .. " + B", hl.dsp.exec_cmd("chromium"))
hl.bind(mod .. " + E", hl.dsp.exec_cmd("wofi-emoji"))
hl.bind(mod .. " + ALT + E", hl.dsp.exec_cmd("zeditor ~/.config/hypr/conf/keybindings.lua"))
hl.bind(mod .. " + Q", hl.dsp.window.close())
hl.bind(mod .. " + ALT + N", hl.dsp.exec_cmd("skygqts workspace-manager toggle"))
hl.bind(mod .. " + ALT + N", hl.dsp.exec_cmd("skygqts workspace-badge edit"))
-- =========================
-- Navigation
-- =========================
@@ -22,7 +22,9 @@ hl.bind(mod .. " + up", hl.dsp.focus({ workspace = "e-1" }))
hl.bind(mod .. " + down", hl.dsp.focus({ workspace = "e+1" }))
-- for the 4-finger swipe equivalent)
hl.bind(mod .. " + Tab", hl.dsp.exec_cmd("qs -c overview ipc call overview toggle"))
-- hl.bind(mod .. " + Tab", hl.dsp.exec_cmd("qs -c overview ipc call overview toggle"))
hl.bind(mod .. " + Tab", hl.dsp.exec_cmd("skygqts workspace-manager toggle"))
--
hl.bind(mod .. " + SHIFT + Tab", hl.dsp.focus({ monitor = "+1" }))
-- =========================
+2 -2
View File
@@ -10,5 +10,5 @@ require("conf/inputs")
require("conf/window-rules")
require("conf/keybindings")
require("conf/autostart")
require("conf.omarchy.index")
-- require("conf.noctalia.index")
-- require("conf.omarchy.index")
require("conf.noctalia.index")
+2 -2
View File
@@ -15,7 +15,7 @@ binds {
Mod+E { spawn "wofi-emoji"; }
Mod+Alt+E { spawn-sh "zeditor ~/.config/niri/shared/binds.kdl"; }
Mod+Q { close-window; }
Mod+Alt+N hotkey-overlay-title="Workspace: Rename" { spawn "skygqts" "workspace-manager" "rename"; }
Mod+Alt+N hotkey-overlay-title="Workspace: Rename" { spawn "skygqts" "workspace-badge" "edit"; }
// =========================
@@ -26,7 +26,7 @@ binds {
Mod+Up { focus-workspace-up; }
Mod+Right { focus-column-right; }
Mod+Tab hotkey-overlay-title="Workspace: Rename" { spawn "skygqts" "workspace-manager" "windows"; }
Mod+Ctrl+Tab hotkey-overlay-title="Workspace: Cycle" { spawn "skygqts" "workspace-manager" "toggle"; }
Mod+Shift+Tab { focus-monitor-next; }
// =========================
+1
View File
@@ -2,5 +2,6 @@
skygqts workspace-manager &
skygqts workspace-badge &
notify-send "Autostarted ran!"
@@ -8,6 +8,7 @@ local mod = "SUPER"
-- =========================
hl.bind(mod .. " + T", hl.dsp.exec_cmd("ghostty"))
hl.bind(mod .. " + Q", hl.dsp.window.close())
hl.bind(mod .. " + Space", hl.dsp.exec_cmd("noctalia msg panel-toggle launcher"))
-- =========================
-- Navigation
Generated
+307 -278
View File
File diff suppressed because it is too large. Load diff
+76 -13
View File
@@ -4,6 +4,19 @@
skygqts.url = "git+ssh://gitea@gitea.app.internal:22/ari/skygqts.git";
skygqts.inputs.nixpkgs.follows = "nixpkgs";
hermenix.url = "git+ssh://gitea@gitea.app.internal:22/ari/hermenix.git";
nbot = {
url = "git+ssh://git@github.com/SkyG-Org/nBot.git";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
looprail = {
url = "git+ssh://git@github.com/SkyG-Org/LoopRail.git";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
# Read-only host monitor (systemd, journal, Docker) over REST + MCP.
skyg-linux-tracker = {
url = "git+https://gitea.skyg.ca/ari/skyg-linux-tracker.git";
inputs.nixpkgs.follows = "nixpkgs";
};
# Headless Hyprland session streamed over a Unix socket.
hhstream = {
url = "git+ssh://gitea@gitea.app.internal:22/Hermenix/hyprland-headless-stream-plugin.git";
@@ -21,6 +34,8 @@
determinate.url = "https://flakehub.com/f/DeterminateSystems/determinate/*";
determinate.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0";
# Slack 4.53.287, NixOS/nixpkgs#557737.
nixpkgs-slack.url = "github:NixOS/nixpkgs/713bc1926b25ad17376e552e339faeea73cf86dc";
nixpkgs-unstable.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";
# my fork of nixpkgs
my-nixpkgs.url = "github:asosnovsky/nixpkgs/ds4-init";
@@ -76,19 +91,17 @@
};
# Hyprland
hyprlauncher.url = "github:hyprwm/hyprlauncher";
# Hyprland compositor via flake (latest git).
hyprland.url = "github:hyprwm/Hyprland";
# Hyprland compositor via flake — pinned to the latest stable release tag
# (was floating on main, 50 commits past v0.57.0, which caused a
# compositor render-spin episode on fwbook: ~4-core spin, 100°C, no
# suspend requested). Re-lock with: nix flake lock --update-input hyprland
hyprland.url = "github:hyprwm/Hyprland/v0.57.0";
# Secrets management
agenix.url = "github:ryantm/agenix";
# Tether — iPhone ↔ Linux Wayland bridge
tether = {
url = "github:zackb/tether";
inputs.nixpkgs.follows = "nixpkgs";
};
herdr.url = "github:herdrdev/herdr";
ai-usagebar.url = "github:akitaonrails/ai-usagebar";
# Declarative disk partitioning (for nixos-anywhere installs)
disko = {
url = "github:nix-community/disko";
@@ -104,8 +117,12 @@
{ self
, skygqts
, hermenix
, skyg-linux-tracker
, nbot
, looprail
, hhstream
, nixpkgs-unstable
, nixpkgs-slack
, flox
, determinate
, nixos-hardware
@@ -126,10 +143,8 @@
, nix-index-database
, agenix
, hermes-agent
, tether
, herdr
, disko
, ai-usagebar
, buildbot-nix
}:
let
@@ -174,11 +189,26 @@
buildbot-gitea-webhook-secret = ./secrets/buildbot-gitea-webhook-secret.age;
buildbot-gitea-oauth-secret = ./secrets/buildbot-gitea-oauth-secret.age;
immich-shared = ./secrets/immich-shared.age;
grafana-secret-key = ./secrets/grafana-secret-key.age;
umami-app-secret = ./secrets/umami-app-secret.age;
linux-tracker-peer-minipc1 = ./secrets/linux-tracker-peer-minipc1.age;
linux-tracker-peer-minipc2 = ./secrets/linux-tracker-peer-minipc2.age;
linux-tracker-peer-minipc3 = ./secrets/linux-tracker-peer-minipc3.age;
linux-tracker-peer-bigbox1 = ./secrets/linux-tracker-peer-bigbox1.age;
linux-tracker-peer-bigbox2 = ./secrets/linux-tracker-peer-bigbox2.age;
linux-tracker-peer-terra1 = ./secrets/linux-tracker-peer-terra1.age;
scrypted-envs = ./secrets/scrypted-envs.age;
nbot-slack = ./secrets/nbot-slack.age;
nbot-goose = ./secrets/nbot-goose.age;
nbot-cluster = ./secrets/nbot-cluster.age;
nbot-cluster-hl-fws1 = ./secrets/nbot-cluster-hl-fws1.age;
github-runner-token-fws1 = ./secrets/github-runner-token-fws1.age;
};
inherit
hyprlauncher
hyprland
nixpkgs-unstable
nixpkgs-slack
my-nixpkgs
dms
dank-greeter
@@ -188,12 +218,13 @@
hermes-agent
skygqts
hermenix
skyg-linux-tracker
nbot
looprail
hhstream
flox
determinate
tether
herdr
ai-usagebar
;
};
}
@@ -212,11 +243,40 @@
let
pkgs = nixpkgs.legacyPackages.${system};
qtDocs = pkgs.qt6.qtdoc;
# Hook: run skyg pkgs update --all at most once a week; fail if it bumped
# anything under pkgs/ so bumps get reviewed and staged, never auto-committed.
pkgs-update-script = pkgs.writeShellScriptBin "skyg-pkgs-update" ''
set -euo pipefail
export PATH=${pkgs.bash}/bin:${pkgs.coreutils}/bin:${pkgs.curl}/bin:${pkgs.jq}/bin:${pkgs.git}/bin:${pkgs.gnused}/bin:${pkgs.gawk}/bin:$PATH
root=$(${pkgs.git}/bin/git rev-parse --show-toplevel)
cd "$root"
stamp=$(${pkgs.git}/bin/git rev-parse --git-path pkgs-update-last-success)
now=$(date +%s)
last_run=$(date -r "$stamp" +%s 2>/dev/null || echo 0)
if (( now - last_run < 604800 )); then
exit 0
fi
${pkgs.nushell}/bin/nu --commands 'use ./bin/lib/cmds.nu *; skyg pkgs update --all'
touch "$stamp"
if ! ${pkgs.git}/bin/git diff --quiet -- pkgs/; then
echo ""
echo "pkgs-update: version bumps applied under pkgs/ — review 'git diff pkgs/',"
echo "stage them ('git add pkgs/') and commit again."
exit 1
fi
'';
pre-commit-check = git-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixpkgs-fmt.enable = true;
stylua.enable = true;
pkgs-update = {
enable = true;
entry = "${pkgs-update-script}/bin/skyg-pkgs-update";
language = "system";
pass_filenames = false;
always_run = true;
};
};
};
in
@@ -236,6 +296,7 @@
agenix.packages.${system}.default
age
yq
nak
home-manager.packages.${system}.home-manager
rustc
cargo
@@ -294,9 +355,9 @@
skyg-dns-records = dnsRecordsFile;
ds4 = my-nixpkgs.legacyPackages.${system}.ds4;
buzz-desktop = lib.pkgs.${system}.buzz-desktop;
superset-desktop = lib.pkgs.${system}.superset-desktop;
delta-editor = lib.pkgs.${system}.delta-editor;
colibri = lib.pkgs.${system}.colibri;
llama-cpp-halo = lib.pkgs.${system}.llama-cpp-halo;
herdr = herdr.packages.${system}.default;
}
);
@@ -326,6 +387,7 @@
./hosts/hl-fws1.disko.nix
nixos-hardware.nixosModules.framework-11th-gen-intel
disko.nixosModules.disko
nbot.nixosModules.host
];
};
hl-fwdesk = lib.makeNixOs {
@@ -336,6 +398,7 @@
nixos-hardware.nixosModules.framework-desktop-amd-ai-max-300-series
hermenix.nixosModules.default
buildbot-nix.nixosModules.buildbot-worker
nbot.nixosModules.host
];
};
hl-bigbox1 = lib.makeNixOs {
+7 -7
View File
@@ -31,13 +31,13 @@ hosts/
| Folder | Host | Role |
| ------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `fwbook/` | fwbook | Framework 13 AMD — personal laptop / daily driver |
| `hl-fwdesk/` | hl-fwdesk | Framework Desktop AI Max 300 — AI workstation; buildbot-nix CI worker (4 cores) |
| `hl-fws1/` | hl-fws1 | Framework 11th Intel — K3s server node |
| `hl-bigbox1/` | hl-bigbox1 | AI/compute server (NVIDIA + AMD) |
| `hl-bigbox2/` | hl-bigbox2 | NFS storage server; Immich (docker, `immich.home.sosnovsky.ca`) |
| `hl-minipc1/` | hl-minipc1 | Core infra: Gitea (native or containerized), nix-serve, registry, Buzz (docker, `buzz-manage` CLI) |
| `hl-minipc2/` | hl-minipc2 | Container/media server |
| `hl-minipc3/` | hl-minipc3 | K3s worker node; central Caddy reverse-proxy (`*.home.sosnovsky.ca`, plus `gitea.skyg.ca` HTTP/SSH); buildbot-nix CI master + worker (2 cores) |
| `hl-fwdesk/` | hl-fwdesk | Framework Desktop AI Max 300 — AI workstation; buildbot-nix CI worker (4 cores); nbot master |
| `hl-fws1/` | hl-fws1 | Framework 11th Intel — K3s server node; nbot worker |
| `hl-bigbox1/` | hl-bigbox1 | AI/compute server (NVIDIA + AMD); Immich machine-learning (CUDA); CPU idle capped at C1 (`processor.max_cstate=1`) against Ryzen idle freezes |
| `hl-bigbox2/` | hl-bigbox2 | NFS storage server; Immich server/db (docker, `immich.home.sosnovsky.ca`) |
| `hl-minipc1/` | hl-minipc1 | Core infra: Gitea (native or containerized), nix-serve, registry, Buzz (docker, `buzz-manage` CLI), monitoring (Grafana, Prometheus, Loki, OTel collector) |
| `hl-minipc2/` | hl-minipc2 | Container/media server; Umami for LoopRail telemetry (own nspawn container, `10.0.101.14`, reachable only from Caddy) |
| `hl-minipc3/` | hl-minipc3 | K3s worker node; central Caddy reverse-proxy (`*.home.sosnovsky.ca`, plus `gitea.skyg.ca` HTTP/SSH); serves LoopRail docs at `looprails.skyg.ca`, plus its guarded telemetry route `/t/v1` → Umami and the LAN-only `umami.home.sosnovsky.ca`; buildbot-nix CI master + worker (2 cores) |
| `hl-pi1/` | hl-pi1 | Raspberry Pi CM4 (aarch64) — headless server, SSH only |
| `hl-pi2/` | hl-pi2 | Raspberry Pi 4 (aarch64) — headless server, SSH only |
| `hl-terra1/` | hl-terra1 | NFS storage + Jellyfin backup |
+3
View File
@@ -3,10 +3,12 @@
imports = [
./hardware-configuration
./packages.nix
./slack.nix
./services.nix
./networking.nix
./hardware.nix
./systemd.nix
./omarchy.nix
];
skyg = {
@@ -28,6 +30,7 @@
printers.enable = true;
fixes = {
airpod-bluetooth.enabled = true;
fingerprint-autosuspend.enabled = true;
};
tiler = {
enable = true;
+1 -1
View File
@@ -19,7 +19,7 @@ in
"x-scheme-handler/mailto" = "chromium-browser.desktop";
"x-scheme-handler/sgnl" = "signal.desktop";
"x-scheme-handler/signalcaptcha" = "signal.desktop";
"x-scheme-handler/slack" = "slack.desktop";
"x-scheme-handler/slack" = "slack-link-picker.desktop";
"x-scheme-handler/terminal" = "com.mitchellh.ghostty.desktop";
"application/pdf" = "chromium-browser.desktop";
"application/xhtml+xml" = "chromium-browser.desktop";
+1
View File
@@ -13,6 +13,7 @@ in
};
networking.firewall.allowedUDPPorts = openPorts;
networking.firewall.allowedTCPPorts = openPorts;
programs.mosh.enable = true;
networking.hosts = {
"0.0.0.0" = [
"auth.me.internal"
+34
View File
@@ -0,0 +1,34 @@
{ pkgs, nixarchy, skygUtils, config, ... }:
let
# Omarchy shell build
dedent = "${pkgs.gawk}/bin/awk 'BEGIN{m=9999} {l[NR]=$0; match($0,/^ */); if ($0 ~ /[^ ]/ && RLENGTH<m) m=RLENGTH} END{for(i=1;i<=NR;i++) print substr(l[i],m+1)}'";
omarchy = ((pkgs.extend nixarchy.overlays.default).omarchy).overrideAttrs (old: {
installPhase = builtins.replaceStrings
[ "python3 -c '" "' $menu\n" ]
[ "python3 -c \"$(printf '%s' '" "' | ${dedent})\" $menu\n" ]
old.installPhase;
});
# The shell's runtime deps, minus hyprland (we keep the flake's Hyprland).
# Omarchy runtime deps
omarchyRuntime = builtins.filter
(d: !(pkgs.lib.hasPrefix "hyprland-" (d.name or "")))
omarchy.passthru.runtimeDeps;
in
{
# Omarchy env vars (shell resolves paths via OMARCHY_PATH)
environment.sessionVariables.OMARCHY_PATH = "${omarchy}/share/omarchy";
environment.sessionVariables.OMARCHY_SCREENSHOT_EDITOR = "satty-edit";
# Omarchy config link: ~/.config/omarchy -> configs/fwbook/omarchy
system.userActivationScripts.omarchyConfig.text =
skygUtils.makeHyperlinkScriptToConfigs {
filePath = "fwbook/omarchy";
targetPath = "omarchy";
configSource = "/home/${config.skyg.user.name}/nixos-setup/configs";
};
# Packages
environment.systemPackages =
[ omarchy ]
++ omarchyRuntime;
}
+81 -127
View File
@@ -1,24 +1,5 @@
{ pkgs, unstablePkgs, ai-usagebar, hermes-agent, nixarchy, skygUtils, config, ... }:
{ pkgs, unstablePkgs, looprail, ... }:
let
# Omarchy (nixarchy) shell, hand-wired — no nixarchy modules. The shell is
# launched from configs/fwbook/hypr/conf/autostart.lua (omarchy-launch-shell).
#
# Workaround for an upstream bug in nixarchy v4.0.4-1: the omarchy package's
# installPhase is one '' string whose least-indented lines are the shell-quoted
# omarchy-theme-set patterns (indent 4), so Nix dedents the whole string by 4
# and the inline `python3 -c '...'` menu check stays indented -> IndentationError.
# Wrap that one invocation so its code is dedented before Python sees it.
dedent = "${pkgs.gawk}/bin/awk 'BEGIN{m=9999} {l[NR]=$0; match($0,/^ */); if ($0 ~ /[^ ]/ && RLENGTH<m) m=RLENGTH} END{for(i=1;i<=NR;i++) print substr(l[i],m+1)}'";
omarchy = ((pkgs.extend nixarchy.overlays.default).omarchy).overrideAttrs (old: {
installPhase = builtins.replaceStrings
[ "python3 -c '" "' $menu\n" ]
[ "python3 -c \"$(printf '%s' '" "' | ${dedent})\" $menu\n" ]
old.installPhase;
});
# The shell's runtime deps, minus hyprland (we keep the flake's Hyprland).
omarchyRuntime = builtins.filter
(d: !(pkgs.lib.hasPrefix "hyprland-" (d.name or "")))
omarchy.passthru.runtimeDeps;
gdk = pkgs.google-cloud-sdk.withExtraComponents (
with pkgs.google-cloud-sdk.components;
[
@@ -26,10 +7,6 @@ let
kubectl
]
);
# Resolve bundles its own Qt5, which has no wayland platform plugin. The
# Hyprland session exports QT_QPA_PLATFORM=wayland globally
# (configs/fwbook/hypr/conf/env.lua), so Resolve aborts at startup. Force
# xcb — Resolve is X11-only and runs under XWayland anyway.
davinci-resolve-wrapped = pkgs.symlinkJoin {
name = "davinci-resolve";
paths = [ pkgs.davinci-resolve ];
@@ -40,144 +17,121 @@ let
};
in
{
# The shell resolves everything through OMARCHY_PATH.
environment.sessionVariables.OMARCHY_PATH = "${omarchy}/share/omarchy";
environment.sessionVariables.OMARCHY_SCREENSHOT_EDITOR = "satty-edit";
# ~/.config/omarchy -> configs/fwbook/omarchy (same pattern as hypr/noctalia).
system.userActivationScripts.omarchyConfig.text =
skygUtils.makeHyperlinkScriptToConfigs {
filePath = "fwbook/omarchy";
targetPath = "omarchy";
configSource = "/home/${config.skyg.user.name}/nixos-setup/configs";
};
environment.systemPackages =
[ omarchy ]
++ omarchyRuntime
# Theme application: omarchy-theme-set-gnome writes gsettings, and every
# theme names a Yaru icon variant.
++ (with pkgs; [
(with pkgs; [
# Desktop & theme
glib
gsettings-desktop-schemas
gnome-themes-extra
yaru-theme
adwaita-icon-theme
])
++ (with pkgs; [
oreo-cursors-plus
# Screen & images
grim
slurp
wl-clipboard
tesseract
wl-screenrec
gpu-screen-recorder
gifski
imagemagick
zbar
curl
translate-shell
wl-screenrec
tesseract
# Media & creative
obs-studio
davinci-resolve-wrapped
shotcut
ffmpeg
gifski
libusb1
lshw
jq
parted
gparted-full
f3
nixd
kdePackages.qtdeclarative
krita
gimp-with-plugins
simple-scan
orca-slicer
# Chat & meetings
zoom-us
discord
betterdiscordctl
signal-desktop
telegram-desktop
# Office
onlyoffice-desktopeditors
darling-dmg
piper-tts
ffmpeg
oreo-cursors-plus
postgresql
google-cloud-sdk
awscli
openfortivpn
openfortivpn-webview
openfortivpn-webview-qt
nodejs
# Wine
wineWow64Packages.stable
winetricks
wineWow64Packages.waylandFull
obs-studio
davinci-resolve-wrapped
grim
slurp
wl-clipboard
tesseract
imagemagick
zbar
curl
translate-shell
wl-screenrec
ffmpeg
gifski
jq
# Cloud, VPN & data
postgresql
google-cloud-sdk
gdk
awscli
openfortivpn
openfortivpn-webview
openfortivpn-webview-qt
bitwarden-cli
krita
gimp-with-plugins
shotcut
simple-scan
zoom-us
betterdiscordctl
discord
signal-desktop
telegram-desktop
# Disks & hardware
libusb1
lshw
parted
gparted-full
f3
rpi-imager
rpiboot
libimobiledevice
ifuse
idevicerestore
# Languages & dev tools
nodejs
python313
python314
uv
pipx
cargo
rustc
go
pipx
rust-analyzer
vscode
unstablePkgs.zed-editor-fhs
devenv
nixd
kdePackages.qtdeclarative
just
rpi-imager
rpiboot
code-cursor-fhs
nix-prefetch
orca-slicer
devcontainer
gpu-screen-recorder
unstablePkgs.devcontainer
unstablePkgs.devenv
flox_dev
darling-dmg
bitwarden-cli
onlyoffice-desktopeditors
nix-prefetch
gh
gdk
unstablePkgs.slack
bubblewrap
delta-editor
libimobiledevice
ifuse
idevicerestore
# Editors
unstablePkgs.vscode
unstablePkgs.zed-editor-fhs
code-cursor-fhs
# Agents & LLM tools
unstablePkgs.claude-code
unstablePkgs.claude-agent-acp
unstablePkgs.grok-build
unstablePkgs.pi-coding-agent
unstablePkgs.goose-cli
unstablePkgs.claude-agent-acp
unstablePkgs.claude-code
buzz-desktop
bubblewrap
delta-editor
herdr
superset-desktop
ai-usagebar.packages.${pkgs.stdenv.hostPlatform.system}.default
hermes-agent.packages.${pkgs.stdenv.hostPlatform.system}.default
skygqts
unstablePkgs.herdr
unstablePkgs.codex
unstablePkgs.codex-acp
looprail.packages.${pkgs.stdenv.hostPlatform.system}.looprail
hermenix
config.services.hyprland-headless-stream.package
unstablePkgs.pi-coding-agent
# Remote & CLI tools
unstablePkgs.et
curl
jq
translate-shell
buzz-desktop
skygqts
]);
}
+2 -19
View File
@@ -1,20 +1,8 @@
{ pkgs, unstablePkgs, config, hyprland, ... }:
{ unstablePkgs, ... }:
{
services.tailscale.enable = true;
services.tailscale.extraDaemonFlags = [ "--statedir=/var/lib/tailscale" ];
programs.tether = {
enable = true;
wifi = {
enable = true;
openFirewall = true;
};
bluetooth = {
enable = true;
adapters = [ "hci0" ];
};
};
services.flatpak.enable = true;
services.flatpak.packages = [
"io.github.kolunmi.Bazaar"
@@ -30,7 +18,7 @@
programs.steam = {
enable = true;
extest.enable = true;
extest.enable = false;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
@@ -53,9 +41,4 @@
"modesetting"
"fbdev"
];
services.hyprland-headless-stream = {
enable = true;
hyprlandPackage = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
sessions.enable = true;
};
}
+65
View File
@@ -0,0 +1,65 @@
{ pkgs, nixpkgs-slack, ... }:
let
slack = (import nixpkgs-slack {
system = pkgs.stdenv.hostPlatform.system;
config.allowUnfreePredicate = pkg: pkgs.lib.getName pkg == "slack";
}).slack;
slackIcon = "${slack}/share/icons/hicolor/512x512/apps/slack.png";
makeSlack =
{ id, name, color }:
let
icon = pkgs.runCommand "slack-${id}-icon.png" { nativeBuildInputs = [ pkgs.imagemagick ]; } ''
magick ${slackIcon} -modulate 100,0 -fill '${color}' -tint 100 $out
'';
bin = pkgs.writeShellScriptBin "slack-${id}" ''
exec ${slack}/bin/slack --user-data-dir="''${XDG_CONFIG_HOME:-$HOME/.config}/Slack-${name}" "$@"
'';
desktop = pkgs.makeDesktopItem {
name = "slack-${id}";
desktopName = "Slack (${name})";
exec = "${bin}/bin/slack-${id} -s %U";
inherit icon;
startupWMClass = "Slack";
categories = [ "Network" "InstantMessaging" ];
};
in
pkgs.symlinkJoin {
name = "slack-${id}";
paths = [ bin desktop ];
};
slack-sibli = makeSlack { id = "sibli"; name = "Sibli"; color = "#2EB67D"; };
slack-personal = makeSlack { id = "personal"; name = "Personal"; color = "#4A154B"; };
# Opens slack:// links in the Slack you pick.
slack-link-picker =
let
bin = pkgs.writeShellScriptBin "slack-link-picker" ''
choice=$(printf '%s\n' "Slack" "Slack (Sibli)" "Slack (Personal)" \
| ${pkgs.rofi}/bin/rofi -dmenu -i -p "Open Slack link in")
case "$choice" in
"Slack") exec ${slack}/bin/slack -s "$@" ;;
"Slack (Sibli)") exec ${slack-sibli}/bin/slack-sibli -s "$@" ;;
"Slack (Personal)") exec ${slack-personal}/bin/slack-personal -s "$@" ;;
esac
'';
desktop = pkgs.makeDesktopItem {
name = "slack-link-picker";
desktopName = "Slack Link Picker";
exec = "${bin}/bin/slack-link-picker %U";
icon = "slack";
noDisplay = true;
mimeTypes = [ "x-scheme-handler/slack" ];
};
in
pkgs.symlinkJoin {
name = "slack-link-picker";
paths = [ bin desktop ];
};
in
{
environment.systemPackages = [
slack-sibli
slack-personal
slack-link-picker
];
}
+6
View File
@@ -1,4 +1,10 @@
{ ... }:
{
systemd.services.systemd-udev-settle.enable = false;
# Snapper needs a .snapshots subvolume in each snapshotted volume
systemd.tmpfiles.rules = [
"v /.snapshots 0750 root root -"
"v /home/.snapshots 0750 root root -"
];
}
+4 -2
View File
@@ -10,14 +10,16 @@
skyg = {
user.enable = true;
server.admin.enable = true;
server.exporters.enable = true;
nixos = {
desktop = {
enable = false;
gnome.enable = false;
};
common.ssh-server.enable = true;
common.containers.openMetricsPort = true;
common.diagnix.enable = true;
common.dns.enable = true;
common.hardware = {
nvidia.enable = true;
amdgpu.enable = true;
+1 -1
View File
@@ -1,8 +1,8 @@
{ pkgs, ... }:
{
services.fwupd.enable = true;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
boot.kernelPackages = pkgs.linuxPackages;
boot.kernelParams = [ "processor.max_cstate=1" ];
networking.interfaces.enp4s0.wakeOnLan.enable = true;
networking.interfaces.lo.wakeOnLan.enable = true;
}
+3
View File
@@ -1,7 +1,10 @@
{
imports = [
./jellyfin.nix
./immich-ml.nix
./portainer.nix
./timers.nix
./linux-tracker.nix
./llama-cpp.nix
];
}
+33
View File
@@ -0,0 +1,33 @@
{ config, ... }:
let
version = "v3";
app = config.skyg.internalNetworkingMap.apps.immich-ml;
in
{
skyg.nixos.common.container-services.immich-ml = {
enable = true;
autoUpdate.enable = true;
networks.lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose;
volumes.model-cache = { };
services.immich-machine-learning = {
image = "ghcr.io/immich-app/immich-machine-learning:${version}-cuda";
networks.lan.ipv4_address = app.ip;
volumes = [ "model-cache:/cache" ];
environment.NVIDIA_VISIBLE_DEVICES = "all";
deploy.resources = {
limits = {
cpus = "4";
memory = "16G";
};
reservations.devices = [
{
driver = "cdi";
device_ids = [ "nvidia.com/gpu=all" ];
capabilities = [ "gpu" ];
}
];
};
restart = "always";
};
};
}
+2 -1
View File
@@ -6,6 +6,7 @@ in
skyg.nixos.common.container-services.jellyfin = {
enable = true;
autoUpdate.enable = true;
networks.lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose;
services.jellyfin = {
image = "jellyfin/jellyfin";
deploy.resources.reservations.devices = [
@@ -34,7 +35,7 @@ in
JELLYFIN_CONFIG_DIR = "/mnt/apps/jellyfin/config";
NVIDIA_VISIBLE_DEVICES = "all";
};
ports = [ "8096:8096" ];
networks.lan.ipv4_address = app.ip;
};
volumes = {
torrents = {
@@ -0,0 +1,18 @@
{ config, ... }:
{
services.skyg-linux-tracker = {
enable = true;
bind = "0.0.0.0";
openFirewall = true;
docker.enable = config.virtualisation.docker.enable;
# Reachable only by its lab FQDN; the short name does not resolve.
allowedHosts = [ "bigbox1.lab.internal" ];
# OTLP out to the collector on minipc1.
settings.otel = {
enabled = true;
endpoint = "http://minipc1.lab.internal:4317";
protocol = "grpc";
export_logs = true;
};
};
}
+37
View File
@@ -0,0 +1,37 @@
{ ... }:
{
# llama.cpp with DFlash2 speculative decoding on RTX 3060 (12GB VRAM).
#
# Off by default: it needs ~19 GB of weights on disk. Fetch the files, then
# flip enable:
#
# sudo install -d -o ari -g users /var/lib/llama-cpp
# cd /var/lib/llama-cpp
# curl -L -O https://huggingface.co/ggml-org/Qwen3.8-27B-GGUF/resolve/main/Qwen3.8-27B-Q4_K_M.gguf
# curl -L -O https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2-GGUF/resolve/main/Qwen3.8-27B-DFlash2-Q8_0.gguf
#
# Measured expectation: ~15-25 tok/s (RTX 3060 has less bandwidth than Strix
# Halo, but the dedicated VRAM is snappier for inference).
skyg.nixos.server.services.llama-cpp = {
enable = false;
package = "llama-cpp-cuda";
model = "/var/lib/llama-cpp/Qwen3.8-27B-Q4_K_M.gguf";
draftModel = "/var/lib/llama-cpp/Qwen3.8-27B-DFlash2-Q8_0.gguf";
specType = "draft-dflash";
specDraftNMax = 7;
ctx = 32768;
kvCacheType = "q8_0";
cacheReuse = 256;
# RTX 3060: 12GB VRAM, offload most layers but leave headroom for context.
gpuLayers = 30;
parallel = 2;
host = "0.0.0.0";
port = 8081;
openFirewall = true;
};
}
+6 -2
View File
@@ -13,14 +13,18 @@
user.enable = true;
nixos.common = {
ssh-server.enable = true;
containers.openMetricsPort = true;
diagnix.enable = true;
dns.enable = true;
containers.networks.ipvlanLab = {
enable = true;
parent = "enp3s0";
};
cachePush.enable = false;
cacheReceive.enable = true;
};
server.exporters.enable = true;
networkDrives = {
enable = true;
bigBox2.enable = false;
+37 -2
View File
@@ -1,4 +1,39 @@
{ ... }:
{ config, pkgs, ... }:
{
services.fwupd.enable = true;
# Interim: the box loses power under load. Use less power and heat, log more.
# Remove this block once the new board is in and stable.
systemd.tmpfiles.rules = [
# No turbo. Lost on reboot unless set here.
"w /sys/devices/system/cpu/cpufreq/boost - - - - 0"
# Max clock 2.5 GHz. Steps on this CPU: 3.5, 3.0, 2.5, 2.0, 1.4.
"w /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq - - - - 2500000"
];
# Keep logs on disk and flush often, so the last seconds before a crash survive.
services.journald.extraConfig = ''
Storage=persistent
SystemMaxUse=2G
SyncIntervalSec=5s
'';
# Reboot 10 s after a kernel panic instead of hanging.
boot.kernel.sysctl."kernel.panic" = 10;
# Watch disk health and log warnings. No mail set up.
services.smartd = {
enable = true;
autodetect = true;
};
environment.systemPackages = [
pkgs.smartmontools
pkgs.lm_sensors
pkgs.dmidecode
pkgs.stress-ng
pkgs.memtester
pkgs.ethtool
config.boot.kernelPackages.cpupower
];
}
+1
View File
@@ -4,5 +4,6 @@
./nix-serve.nix
./nfs-server.nix
./immich.nix
./linux-tracker.nix
];
}
+6 -9
View File
@@ -11,6 +11,8 @@ let
POSTGRES_USER = "immich";
POSTGRES_DB = "immich";
DB_DATABASE_NAME = "immich";
IMMICH_MACHINE_LEARNING_URL = "http://${config.skyg.internalNetworkingMap.apps.immich-ml.ip}:3003";
};
nfsVolume = skygUtils.container-services.nfsVols.tnas1;
in
@@ -26,12 +28,15 @@ in
};
volumes = {
family-storage = nfsVolume "/mnt/EightTerra/FamilyStorage";
model-cache = { };
};
services.immich-server = {
image = "ghcr.io/immich-app/immich-server:${version}";
environmentFiles = [ config.age.secrets.immich-shared.path ];
environment = envVars;
deploy.resources.limits = {
cpus = "1";
memory = "8G";
};
networks = {
lan.ipv4_address = app.ip;
main = { };
@@ -46,14 +51,6 @@ in
};
restart = "always";
};
services.immich-machine-learning = {
image = "ghcr.io/immich-app/immich-machine-learning:${version}";
environmentFiles = [ config.age.secrets.immich-shared.path ];
environment = envVars;
networks.main = { };
volumes = [ "model-cache:/cache" ];
restart = "always";
};
services.redis = {
image = "docker.io/valkey/valkey:9@sha256:c123e3715db63d06d4ad6964884037aa0d5d4d703939b9929954112889708e1d";
networks.main = { };
@@ -0,0 +1,18 @@
{ config, ... }:
{
services.skyg-linux-tracker = {
enable = true;
bind = "0.0.0.0";
openFirewall = true;
docker.enable = config.virtualisation.docker.enable;
# Reachable only by its lab FQDN; the short name does not resolve.
allowedHosts = [ "bigbox2.lab.internal" ];
# OTLP out to the collector on minipc1.
settings.otel = {
enabled = true;
endpoint = "http://minipc1.lab.internal:4317";
protocol = "grpc";
export_logs = true;
};
};
}
+8 -1
View File
@@ -1,4 +1,4 @@
{ pkgs, unstablePkgs, myPkgs, my-nixpkgs, ... }:
{ pkgs, my-nixpkgs, ... }:
let
ports = {
tabby = 11029;
@@ -40,11 +40,18 @@ in
environment.sessionVariables.ELECTRON_OZONE_PLATFORM_HINT = "wayland";
programs.nh.clean = {
dates = "daily";
extraArgs = "--keep-since 2d --keep 5";
};
skyg = {
user.enable = true;
core.qemu.enable = true;
nixos = {
common.ssh-server.enable = true;
common.diagnix.enable = true;
common.dns.enable = true;
common.cachePush.enable = true;
common.hardware = {
pipewire.enable = true;
+2
View File
@@ -1,4 +1,6 @@
{ ... }:
{
services.tailscale.enable = true;
systemd.network.wait-online.enable = false;
}
+7
View File
@@ -16,6 +16,13 @@
lmstudio
signal-cli
blueman
unstablePkgs.devenv
unstablePkgs.grok-build
unstablePkgs.pi-coding-agent
unstablePkgs.goose-cli
unstablePkgs.claude-agent-acp
unstablePkgs.claude-code
])
++ [ myPkgs.ds4-rocm ];
}
+3
View File
@@ -1,11 +1,14 @@
{
imports = [
./ds4.nix
./llama-cpp.nix
./ollama.nix
./libretranslate.nix
./hermenix.nix
./wyoming.nix
./steam.nix
./buildbot.nix
./linux-tracker.nix
./nbot.nix
];
}
+1 -1
View File
@@ -4,7 +4,7 @@ let
in
{
services.ds4 = {
enable = true;
enable = false;
package = (myPkgs.ds4-rocm.override { rocmArch = "gfx1151"; });
user = "ari";
group = "users";
+7 -1
View File
@@ -4,9 +4,11 @@ let
hermes = 8642;
hermesDashboard = 9119;
hhstreamView = 9988;
hermenixDocs = 9989;
hermesCache = 5001;
ollama = 11434;
ds4 = 8000;
tracker = 1984;
};
in
{
@@ -22,13 +24,14 @@ in
hostLanAddress = "10.0.10.11";
lanGateway = "10.0.0.1";
};
vcpu = 2;
vcpu = 3;
mem = 8000;
hermesHome = "/var/lib/hermes/.hermes";
hostCache.port = ports.hermesCache;
hostAccess = [
{ port = ports.ollama; }
{ port = ports.ds4; }
{ port = ports.tracker; }
];
lanAccess = [
{ address = "10.0.12.1"; port = 80; }
@@ -38,11 +41,14 @@ in
{ address = "10.0.101.3"; port = 8080; }
{ address = "10.0.101.3"; port = 9102; }
{ address = "10.0.101.8"; port = 3000; }
{ address = "10.0.10.0/24"; port = 22; }
];
publish = [
{ hostPort = ports.hermes; guestPort = 8642; }
{ hostPort = ports.hermesDashboard; guestPort = 9119; }
{ hostPort = ports.hhstreamView; guestPort = ports.hhstreamView; }
{ hostPort = ports.hermenixDocs; guestPort = 80; }
];
};
}
@@ -0,0 +1,39 @@
{ config, lib, skyg-secrets, ... }:
let
# Hosts this primary tracker consolidates.
peers = [ "minipc1" "minipc2" "minipc3" "bigbox1" "bigbox2" "terra1" ];
secretName = peer: "linux-tracker-peer-${peer}";
in
{
age.secrets = lib.genAttrs (map secretName peers) (name: {
file = skyg-secrets.${name};
owner = "root";
mode = "0400";
});
services.skyg-linux-tracker = {
enable = true;
bind = "0.0.0.0";
openFirewall = true;
docker.enable = config.virtualisation.docker.enable;
# The Hermes VM reaches this host at 10.77.0.1.
allowedHosts = [ "fwdesk.lab.internal" "10.77.0.1" ];
# Primary: one endpoint for the whole lab (Hermes only talks to this one).
peers = {
enable = true;
peers = lib.genAttrs peers (peer: {
url = "http://${peer}.lab.internal:1984";
tokenFile = config.age.secrets.${secretName peer}.path;
# Trackers have no TLS; token travels in the clear on the lab LAN.
allowPlainHttp = true;
});
};
# OTLP out to the collector on minipc1.
settings.otel = {
enabled = true;
endpoint = "http://minipc1.lab.internal:4317";
protocol = "grpc";
export_logs = true;
};
};
}
+32
View File
@@ -0,0 +1,32 @@
{ ... }:
{
# llama.cpp with DFlash2 speculative decoding.
#
# Off by default: it needs ~19 GB of weights on disk and a first build of the
# ROCm package. Fetch the files, then flip enable:
#
# sudo install -d -o ari -g users /var/lib/llama-cpp
# cd /var/lib/llama-cpp
# curl -L -O https://huggingface.co/ggml-org/Qwen3.8-27B-GGUF/resolve/main/Qwen3.8-27B-Q4_K_M.gguf
# curl -L -O https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2-GGUF/resolve/main/Qwen3.8-27B-DFlash2-Q8_0.gguf
#
# Measured expectation for this box: ~25-40 tok/s, not the 380 tok/s in the
# post that prompted this — that figure is a 3090 copying a document.
skyg.nixos.server.services.llama-cpp = {
enable = false;
model = "/var/lib/llama-cpp/Qwen3.8-27B-Q4_K_M.gguf";
draftModel = "/var/lib/llama-cpp/Qwen3.8-27B-DFlash2-Q8_0.gguf";
specType = "draft-dflash";
specDraftNMax = 7;
ctx = 32768;
kvCacheType = "q8_0";
cacheReuse = 256;
host = "0.0.0.0";
port = 8081;
openFirewall = true;
};
}
+111
View File
@@ -0,0 +1,111 @@
{ config, lib, pkgs, skyg-secrets, ... }:
let
ports = { cluster = 7946; };
homes = "/data/nbot";
goCache = "/data/nbot-cache/go";
secrets = [ "nbot-slack" "nbot-goose" "nbot-cluster" ];
settings = {
# The system each container boots (nbot's agent + gh); updated on every rebuild.
system = "${config.skyg.nixos.server.services.nbot-agent.system}";
machines_dir = "/var/lib/machines";
state_dir = "/var/lib/nbot";
agent_cwd = "/root";
idle_timeout = "6h";
max_idle_timeout = "0s";
allow_indefinite = true;
boot_timeout = "2m";
# Go caches shared by all containers on this node (see ABOUTME). Env vars are in agent_env.
rw_binds = [
"${goCache}/mod:/var/cache/go/mod:idmap"
"${goCache}/build:/var/cache/go/build:idmap"
];
summaries = {
timeout = "10s";
};
# Goose settings sent to every container (also on fws1).
# Values come from the nbot-goose secret.
agent_env = {
COMMAND_CODE_API_KEY = "$COMMAND_CODE_API_KEY";
GH_TOKEN = "$GH_TOKEN";
DIAGNIX_KEY = "$DIAGNIX_KEY";
GOMODCACHE = "/var/cache/go/mod";
GOCACHE = "/var/cache/go/build";
};
model_providers = [
{
id = "custom_commandcode";
name = "Command Code";
key_env = "COMMAND_CODE_API_KEY";
models = [
"deepseek/deepseek-v4-flash"
"minimax/minimax-m3.1-flash"
"minimaxai/minimax-m3"
"anthropic/claude-opus-5-5"
"anthropic/claude-sonnet-5-5"
"anthropic/claude-haiku-5-5"
"reflection/beam:free"
"moonshotai/kimi-k3"
"moonshotai/kimi-k2.7-code"
"zai-org/glm-5.3"
"z-ai/glm-5.3-flash"
"xai/grok-4.7"
"openai/gpt-6.1-sol"
];
}
];
container = { memory_mb = 4096; cpus = 1.0; };
max_container = { memory_mb = 16384; cpus = 4; };
host_reserve = { memory_mb = 32768; cpus = 4.0; };
storage = { min = "2G"; max = "5G"; limit = "20G"; };
drives = [{ path = homes; reserve = "40G"; allow_subdir = true; }];
cluster = {
node_secrets = { hl-fws1 = "$HL_FWS1_CLUSTER_SECRET"; };
listen = ":${toString ports.cluster}";
};
# Only read on first start; after that, manage permissions from Slack.
permissions = {
managers = [ "U0CBGSS4U6A" ];
default.U0CBGSS4U6A = [ "all" ];
};
};
in
{
age.secrets = lib.genAttrs secrets (name: {
file = skyg-secrets.${name};
owner = "root";
mode = "0400";
});
# nbot flake input; options and docs in its repo.
services.nbot = {
enable = true;
mode = "master";
clusterPort = ports.cluster;
kvm = true;
drives = [ homes ];
stateDir = "/var/lib/nbot";
configFile = (pkgs.formats.toml { }).generate "nbot.toml" settings;
};
# The module takes one env file; these add to it.
systemd.services.nbot.serviceConfig.EnvironmentFile =
map (name: config.age.secrets.${name}.path) secrets;
# Container links belong to systemd-networkd.
networking.networkmanager.unmanaged = [ "interface-name:ve-*" ];
networking.dhcpcd.denyInterfaces = [ "ve-*" ];
systemd.tmpfiles.rules = [
"d ${homes} 0700 root root -"
"d ${goCache}/mod 0700 root root -"
"d ${goCache}/build 0700 root root -"
];
}
-2
View File
@@ -3,8 +3,6 @@ let
ports = { ollama = 11434; };
in
{
services.open-webui.enable = true;
users.users.ollama = {
enable = true;
home = "/var/lib/ollama";
+2 -1
View File
@@ -1,8 +1,9 @@
{ ... }:
{ pkgs, ... }:
{
programs.steam = {
enable = true;
extest.enable = true;
extraPackages = [ pkgs.pulseaudio ];
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
+8 -1
View File
@@ -1,7 +1,7 @@
{ pkgs, config, ... }:
{
imports = [
./services.nix
./services
./hardware-configuration
./hardware.nix
./systemd.nix
@@ -11,6 +11,8 @@
user.enable = true;
nixos = {
common.ssh-server.enable = true;
common.diagnix.enable = true;
common.dns.enable = true;
common.hardware.pipewire.enable = true;
desktop = {
enable = true;
@@ -53,6 +55,11 @@
playerctl
];
programs.nh.clean = {
dates = "daily";
extraArgs = "--keep-since 2d --keep 5";
};
services.flatpak.enable = true;
services.flatpak.packages = [ "com.spotify.Client" ];
@@ -1,5 +1,7 @@
{ ... }:
{
imports = [ ./nbot.nix ./github-runners.nix ];
services.pipewire = {
extraConfig.pipewire-pulse."10-raop-discover" = {
context.modules = [
@@ -31,4 +33,18 @@
enable = true;
arguments = "-o pipewire";
};
services.skyg-linux-tracker = {
enable = true;
bind = "0.0.0.0";
openFirewall = true;
allowedHosts = [ "fws1.lab.internal" ];
# OTLP out to the collector on minipc1.
settings.otel = {
enabled = true;
endpoint = "http://minipc1.lab.internal:4317";
protocol = "grpc";
export_logs = true;
};
};
}
+78
View File
@@ -0,0 +1,78 @@
{ config, lib, skyg-secrets, ... }:
let
concurrency = 4;
runnerNames = map (i: "runner-${toString i}") (lib.range 1 concurrency);
stateVersion = config.system.stateVersion;
cache = "/var/cache/github-runners/go";
credentials = "/run/github-runner-registration";
# The same numeric identity owns the bind-mounted caches on the host and in every container.
runnerUser = {
users.github-runner = {
uid = 915;
isSystemUser = true;
group = "github-runner";
};
groups.github-runner.gid = 915;
};
in
{
age.secrets.github-runner-token-fws1 = {
file = skyg-secrets.github-runner-token-fws1;
path = "${credentials}/token";
# The containers mount this directory and must see token rotations.
symlink = false;
mode = "0400";
};
users = runnerUser;
systemd.tmpfiles.rules = [
"d ${credentials} 0700 root root -"
"d ${cache} 0755 root root -"
"d ${cache}/build 0700 github-runner github-runner -"
"d ${cache}/mod 0700 github-runner github-runner -"
];
systemd.services = lib.genAttrs (map (name: "container@${name}") runnerNames) (_: {
serviceConfig = {
MemoryLow = "4G";
MemoryMax = "8G";
CPUQuota = "200%";
};
});
containers = lib.genAttrs runnerNames (name: {
autoStart = true;
bindMounts = {
"${credentials}".isReadOnly = true;
"/var/cache/go" = {
hostPath = cache;
isReadOnly = false;
};
};
config = { pkgs, ... }: {
system.stateVersion = stateVersion;
users = runnerUser;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
services.github-runners.${name} = {
enable = true;
inherit name;
replace = true;
url = "https://github.com/SkyG-Org";
tokenFile = "${credentials}/token";
user = "github-runner";
group = "github-runner";
extraLabels = [ "fws1" "nixos" "go" ];
extraPackages = [ pkgs.go ];
extraEnvironment = {
NIX_REMOTE = "daemon";
GOCACHE = "/var/cache/go/build";
GOMODCACHE = "/var/cache/go/mod";
};
serviceOverrides.ReadWritePaths = [ "/var/cache/go" ];
};
};
});
}
+69
View File
@@ -0,0 +1,69 @@
{ config, pkgs, skyg-secrets, ... }:
let
homes = "/var/lib/nbot/homes";
goCache = "/var/lib/nbot-cache/go";
settings = {
# The system each container boots (nbot's agent + gh); updated on every rebuild.
system = "${config.skyg.nixos.server.services.nbot-agent.system}";
machines_dir = "/var/lib/machines";
state_dir = "/var/lib/nbot";
agent_cwd = "/root";
idle_timeout = "6h";
max_idle_timeout = "0s";
allow_indefinite = true;
boot_timeout = "2m";
# Go caches shared by all containers on this node (see ABOUTME). Env vars come from the master.
rw_binds = [
"${goCache}/mod:/var/cache/go/mod:idmap"
"${goCache}/build:/var/cache/go/build:idmap"
];
container = { memory_mb = 4096; cpus = 1.0; };
max_container = { memory_mb = 51200; cpus = 6; };
host_reserve = { memory_mb = 8192; cpus = 2.0; };
storage = { min = "2G"; max = "10G"; limit = "50G"; };
drives = [{ path = homes; reserve = "200G"; allow_subdir = true; }];
# Worker of the master on fwdesk. Slack tokens and goose settings come
# from the master. Trusts the first certificate it sees (saved in
# state_dir/master.fingerprint); pin it in master_fingerprint if wanted.
cluster = {
name = "hl-fws1";
master = "wss://fwdesk.lab.internal:7946";
master_fingerprint = [ "ce08c6b0f3aec855cc8b936d81449c1a34074d181089b26acbdddacfca60af1d" ];
};
};
in
{
age.secrets.nbot-cluster = {
file = skyg-secrets.nbot-cluster-hl-fws1;
owner = "root";
mode = "0400";
};
# nbot flake input; options and docs in its repo.
services.nbot = {
enable = true;
mode = "slave";
kvm = true;
drives = [ homes ];
stateDir = "/var/lib/nbot";
configFile = (pkgs.formats.toml { }).generate "nbot.toml" settings;
environmentFile = config.age.secrets.nbot-cluster.path;
};
# Container links belong to systemd-networkd.
networking.networkmanager.unmanaged = [ "interface-name:ve-*" ];
networking.dhcpcd.denyInterfaces = [ "ve-*" ];
# networkd only has the container links here (NetworkManager owns wlan),
# so wait-online would always time out.
systemd.network.wait-online.enable = false;
systemd.tmpfiles.rules = [
"d ${homes} 0700 root root -"
"d ${goCache}/mod 0700 root root -"
"d ${goCache}/build 0700 root root -"
];
}
+4 -3
View File
@@ -33,24 +33,25 @@ in
imports = [
./services
./hardware-configuration
./hardware.nix
];
skyg.user.enable = true;
skyg.nixos.common.ssh-server.enable = true;
skyg.nixos.common.diagnix.enable = true;
skyg.nixos.common.dns.enable = true;
skyg.server.dns.routing = {
enable = false;
openFirewall = true;
addressesSecretName = "dns-addresses.conf";
};
skyg.nixos.common.containers.runtime = "docker";
skyg.nixos.common.containers.openMetricsPort = true;
skyg.nixos.common.containers.networks.ipvlanLab = {
enable = true;
parent = "eno1";
};
skyg.server.admin.enable = true;
skyg.server.exporters.enable = true;
skyg.nixos.server.k3s.enable = false;
skyg.networkDrives.enable = true;
-4
View File
@@ -1,4 +0,0 @@
{ ... }:
{
services.fwupd.enable = true;
}
+61 -2
View File
@@ -6,6 +6,7 @@ let
domain = app.effectiveDns;
publicDomain = builtins.elemAt app.aliases 0;
port = 3000;
pairPort = 5000;
ip = app.ip;
bucket = "buzz-media";
images = {
@@ -41,6 +42,7 @@ in
redis.condition = "service_healthy";
minio.condition = "service_healthy";
minio-init.condition = "service_completed_successfully";
relay-index-prebuild.condition = "service_completed_successfully";
};
networks = [ "internal" ];
environmentFiles = [ config.age.secrets.buzz-env.path ];
@@ -52,6 +54,7 @@ in
BUZZ_MEDIA_BASE_URL = "https://${buzz.publicDomain}/media";
BUZZ_MEDIA_SERVER_DOMAIN = buzz.publicDomain;
BUZZ_CORS_ORIGINS = "https://${buzz.publicDomain}";
BUZZ_PAIRING_RELAY_URL = "wss://${buzz.publicDomain}/pair";
BUZZ_S3_ENDPOINT = "http://minio:9000";
BUZZ_S3_REGION = "us-east-1";
BUZZ_S3_ADDRESSING_STYLE = "path";
@@ -70,9 +73,18 @@ in
start_period = "30s";
};
};
pair = {
image = buzz.images.relay;
networks = [ "internal" ];
environment.BUZZ_PAIR_RELAY_BIND_ADDR = "0.0.0.0:${toString buzz.pairPort}";
extraConfig.entrypoint = [ "/usr/local/bin/buzz-pair-relay" ];
};
caddy = {
image = buzz.images.caddy;
extraConfig.depends_on.relay.condition = "service_healthy";
extraConfig.depends_on = {
relay.condition = "service_healthy";
pair.condition = "service_started";
};
networks = {
internal = { };
lan = { ipv4_address = buzz.ip; };
@@ -81,7 +93,13 @@ in
${buzz.publicDomain} {
tls /etc/caddy/tls/fullchain.pem /etc/caddy/tls/key.pem
encode zstd gzip
reverse_proxy relay:${toString buzz.port}
# Only /pair goes to the pairing service
handle /pair {
reverse_proxy pair:${toString buzz.pairPort}
}
handle {
reverse_proxy relay:${toString buzz.port}
}
}
http://${buzz.domain} {
redir https://${buzz.publicDomain}{uri} permanent
@@ -173,6 +191,47 @@ in
};
restart = "no";
};
relay-index-prebuild = {
image = buzz.images.posgres;
networks = [ "internal" ];
environmentFiles = [ config.age.secrets.buzz-env.path ];
environment = {
POSTGRES_DB = "buzz";
POSTGRES_USER = "buzz";
};
files."/usr/local/bin/prebuild-indexes.sh" = ''
#!/bin/sh
set -eu
export PGPASSWORD="$POSTGRES_PASSWORD"
run_psql() {
psql -v ON_ERROR_STOP=1 -h postgres -U "$POSTGRES_USER" -d "$POSTGRES_DB" "$@"
}
ensure_index() {
name="$1"
sql="$2"
state=$(run_psql -tAc "SELECT coalesce((SELECT CASE WHEN i.indisvalid AND i.indisready AND i.indislive THEN 'valid' ELSE 'invalid' END FROM pg_index i WHERE i.indexrelid = to_regclass('public.$name')), 'missing')")
if [ "$state" = valid ]; then
return 0
fi
if [ "$state" = invalid ]; then
run_psql -c "DROP INDEX CONCURRENTLY IF EXISTS public.$name"
fi
run_psql -c "$sql"
}
ensure_index artifact_heads_modified "CREATE INDEX CONCURRENTLY artifact_heads_modified ON public.artifact_heads (community_id, modified_at, artifact_id);"
ensure_index artifact_heads_channel "CREATE INDEX CONCURRENTLY artifact_heads_channel ON public.artifact_heads (community_id, channel_id, artifact_id);"
ensure_index channel_members_sync "CREATE INDEX CONCURRENTLY channel_members_sync ON public.channel_members (community_id, pubkey, sync_modified_at, channel_id);"
ensure_index artifact_revisions_moves "CREATE INDEX CONCURRENTLY artifact_revisions_moves ON public.artifact_revisions (community_id, modified_at, event_id) WHERE source_channel_id IS NOT NULL;"
'';
extraConfig = {
entrypoint = [ "/bin/sh" "/usr/local/bin/prebuild-indexes.sh" ];
depends_on.postgres.condition = "service_healthy";
};
restart = "no";
};
};
};
}
+5
View File
@@ -12,5 +12,10 @@
./iu.nix
./audiobookshelf.nix
./buzz.nix
./linux-tracker.nix
./otel-collector.nix
./prometheus.nix
./loki.nix
./grafana.nix
];
}
+47
View File
@@ -0,0 +1,47 @@
{ config, skyg-secrets, ... }:
let
ports = {
grafana = 3001;
prometheus = 9090;
loki = 3100;
};
in
{
age.secrets.grafana-secret-key = {
file = skyg-secrets.grafana-secret-key;
owner = "grafana";
group = "grafana";
};
services.grafana = {
enable = true;
openFirewall = true;
settings = {
server = {
http_addr = "0.0.0.0";
http_port = ports.grafana;
};
security.secret_key = "$__(file){${config.age.secrets.grafana-secret-key.path}}";
};
provision = {
enable = true;
datasources.settings.datasources = [
{
name = "Prometheus";
type = "prometheus";
access = "proxy";
url = "http://127.0.0.1:${toString ports.prometheus}";
isDefault = true;
}
{
name = "Loki";
type = "loki";
access = "proxy";
url = "http://127.0.0.1:${toString ports.loki}";
}
];
};
};
}
@@ -0,0 +1,18 @@
{ config, ... }:
{
services.skyg-linux-tracker = {
enable = true;
bind = "0.0.0.0";
openFirewall = true;
docker.enable = config.virtualisation.docker.enable;
# Reachable only by its lab FQDN; the short name does not resolve.
allowedHosts = [ "minipc1.lab.internal" ];
# OTLP out to the collector on this box (see ./otel-collector.nix).
settings.otel = {
enabled = true;
endpoint = "http://127.0.0.1:4317";
protocol = "grpc";
export_logs = true;
};
};
}
+94
View File
@@ -0,0 +1,94 @@
{ ... }:
let
ports = {
loki = 3100;
grpc = 9096;
};
dataDir = "/var/lib/loki";
in
{
services.loki = {
enable = true;
# Single-binary Loki on the filesystem: no object store, no ring.
configuration = {
auth_enabled = false;
server = {
http_listen_port = ports.loki;
grpc_listen_port = ports.grpc;
};
common = {
instance_addr = "127.0.0.1";
path_prefix = dataDir;
replication_factor = 1;
ring.kvstore.store = "inmemory";
storage.filesystem = {
chunks_directory = "${dataDir}/chunks";
rules_directory = "${dataDir}/rules";
};
};
schema_config.configs = [
{
from = "2026-10-01";
store = "tsdb";
object_store = "filesystem";
schema = "v13";
index = {
prefix = "index_";
period = "24h";
};
}
];
# The compactor is what enforces the 24h window below.
compactor = {
working_directory = "${dataDir}/compactor";
retention_enabled = true;
delete_request_store = "filesystem";
};
limits_config = {
retention_period = "24h";
reject_old_samples = true;
reject_old_samples_max_age = "168h";
# Required for OTLP ingestion; on by default since 3.0.
allow_structured_metadata = true;
};
ruler = {
storage.type = "local";
storage.local.directory = "${dataDir}/rules";
};
};
};
# Loki data lives on tnas1. Prometheus and Grafana stay on local disk, since
# their databases do not work well on NFS.
# The export must exist on the NAS and be writable by uid 985 / gid 981.
# The mount is ordered after network-online so tnas1's name resolves at boot.
fileSystems.${dataDir} = {
device = "tnas1.lab.internal:/mnt/SmallG/monitoring/loki";
fsType = "nfs";
options = [
"nfsvers=4.0"
"hard"
"noatime"
"nofail"
"_netdev"
"x-systemd.automount"
"x-systemd.requires=network-online.target"
"x-systemd.after=network-online.target"
];
};
systemd.services.loki.unitConfig.RequiresMountsFor = [ dataDir ];
# NFS ownership is numeric, so pin the ids instead of letting NixOS assign
# them by name order (a new user sorting before "loki" would shift them).
users.users.loki.uid = 985;
users.groups.loki.gid = 981;
networking.firewall.allowedTCPPorts = [ ports.loki ];
}
@@ -0,0 +1,61 @@
{ pkgs, ... }:
let
ports = {
otlpGrpc = 4317;
otlpHttp = 4318;
# Loopback scrape target for the Prometheus below.
metrics = 9464;
};
in
{
services.opentelemetry-collector = {
enable = true;
# The prometheus exporter is a contrib component, not core.
package = pkgs.opentelemetry-collector-contrib;
settings = {
receivers.otlp.protocols = {
grpc.endpoint = "0.0.0.0:${toString ports.otlpGrpc}";
http.endpoint = "0.0.0.0:${toString ports.otlpHttp}";
};
processors.batch.timeout = "5s";
exporters = {
# Pull endpoint. Resource attributes (host.name, service.name) only
# become labels when conversion is enabled — off by default, which
# would leave every host's series with an identical label set.
prometheus = {
endpoint = "127.0.0.1:${toString ports.metrics}";
resource_to_telemetry_conversion.enabled = true;
};
# The contrib `loki` exporter was removed upstream; Loki ingests
# OTLP/HTTP natively at /otlp instead.
"otlphttp/loki".endpoint = "http://127.0.0.1:3100/otlp";
nop = { };
};
service.pipelines = {
metrics = {
receivers = [ "otlp" ];
processors = [ "batch" ];
exporters = [ "prometheus" ];
};
logs = {
receivers = [ "otlp" ];
processors = [ "batch" ];
exporters = [ "otlphttp/loki" ];
};
# The tracker ships its own spans; nothing here stores them.
traces = {
receivers = [ "otlp" ];
processors = [ "batch" ];
exporters = [ "nop" ];
};
};
};
};
# Only the OTLP listeners face the lab; 9464 stays on loopback.
networking.firewall.allowedTCPPorts = [ ports.otlpGrpc ports.otlpHttp ];
}
+21
View File
@@ -0,0 +1,21 @@
{ ... }:
let
ports = { prometheus = 9090; };
in
{
services.prometheus = {
enable = true;
port = ports.prometheus;
listenAddress = "0.0.0.0";
retentionTime = "48h";
scrapeConfigs = [
{
job_name = "lab-trackers";
static_configs = [{ targets = [ "127.0.0.1:9464" ]; }];
}
];
};
networking.firewall.allowedTCPPorts = [ ports.prometheus ];
}
+5 -9
View File
@@ -1,19 +1,15 @@
{ pkgs, config, ... }:
let
staticIp = ip: {
lan = { ipv4_address = ip; };
};
in
{ ... }:
{
imports = [
./services
./hardware-configuration
./hardware.nix
./systemd.nix
];
skyg.user.enable = true;
skyg.nixos.common.ssh-server.enable = true;
skyg.nixos.common.diagnix.enable = true;
skyg.nixos.common.dns.enable = true;
skyg.nixos.common.containers.networks.ipvlanLab = {
enable = true;
parent = "enp2s0";
@@ -23,8 +19,8 @@ in
openFirewall = true;
addressesSecretName = "dns-addresses.conf";
};
skyg.nixos.common.containers.openMetricsPort = true;
skyg.server.exporters.enable = true;
skyg.networkDrives.enable = true;
networking.firewall.enable = false;
-4
View File
@@ -1,4 +0,0 @@
{ ... }:
{
services.fwupd.enable = true;
}
+2
View File
@@ -6,5 +6,7 @@
./stack1.nix
./stack2.nix
./timers.nix
./linux-tracker.nix
./umami.nix
];
}
@@ -0,0 +1,18 @@
{ config, ... }:
{
services.skyg-linux-tracker = {
enable = true;
bind = "0.0.0.0";
openFirewall = true;
docker.enable = config.virtualisation.docker.enable;
# Reachable only by its lab FQDN; the short name does not resolve.
allowedHosts = [ "minipc2.lab.internal" ];
# OTLP out to the collector on minipc1.
settings.otel = {
enabled = true;
endpoint = "http://minipc1.lab.internal:4317";
protocol = "grpc";
export_logs = true;
};
};
}
+6 -1
View File
@@ -1,8 +1,9 @@
{ config, ... }:
{ config, skyg-secrets, ... }:
let
app = config.skyg.internalNetworkingMap.apps.nvr;
in
{
age.secrets.scrypted-envs.file = skyg-secrets.scrypted-envs;
skyg.nixos.common.container-services.scrypted = {
enable = true;
autoUpdate.enable = true;
@@ -16,7 +17,11 @@ in
"/opt/homelab/scrypted/db:/server/volume"
"scrypted-nvr:/nvr"
];
devices = [ "/dev/dri:/dev/dri" ];
environment.SCRYPTED_NVR_VOLUME = "/nvr";
environmentFiles = [
config.age.secrets.scrypted-envs.path
];
};
volumes.scrypted-nvr = {
driver = "local";
+74
View File
@@ -0,0 +1,74 @@
{ config, skyg-secrets, ... }:
# Umami collects LoopRail's telemetry. Caddy on minipc3 sends it the public
# POST looprails.skyg.ca/t/v1 and the LAN-only dashboard. It runs in its own
# nspawn container with its own LAN address, and only Caddy can reach it.
let
app = config.skyg.internalNetworkingMap.apps.umami;
caddy = config.skyg.internalNetworkingMap.apps.caddy;
appNetwork = config.skyg.internalNetworkingMap.appNetwork;
parent = config.skyg.nixos.common.containers.networks.ipvlanLab.parent;
# nspawn names the ipvlan link iv-<parent>.
lanIf = "iv-${parent}";
port = 3000;
secretPath = "/run/secrets/umami-app-secret";
hostStateVersion = config.system.stateVersion;
in
{
age.secrets.umami-app-secret.file = skyg-secrets.umami-app-secret;
containers.umami = {
autoStart = true;
# Own network: an ipvlan link on the LAN, like the docker apps get.
privateNetwork = true;
extraFlags = [ "--network-ipvlan=${parent}" ];
bindMounts.${secretPath} = {
hostPath = config.age.secrets.umami-app-secret.path;
isReadOnly = true;
};
config = { lib, ... }: {
system.stateVersion = hostStateVersion;
networking = {
useDHCP = false;
interfaces.${lanIf}.ipv4.addresses = [{
address = app.ip;
prefixLength = lib.toInt (lib.last (lib.splitString "/" appNetwork.subnet));
}];
defaultGateway = { address = appNetwork.gateway; interface = lanIf; };
nftables.enable = true;
firewall = {
enable = true;
# Only Caddy may reach Umami, at most ~20 new connections a second.
# Caddy opens one connection per telemetry request, so this caps requests.
extraInputRules = ''
ip saddr ${caddy.ip} tcp dport ${toString port} ct state new limit rate 20/second burst 100 packets accept
'';
};
};
# Postgres only on its local socket.
services.postgresql.settings.listen_addresses = lib.mkForce "";
services.umami = {
enable = true;
createPostgresqlDatabase = true;
settings = {
APP_SECRET_FILE = secretPath;
HOSTNAME = "0.0.0.0";
PORT = port;
DISABLE_UPDATES = true;
DISABLE_TELEMETRY = true;
# looprail's User-Agent would look like a bot.
DISABLE_BOT_CHECK = true;
};
};
};
};
# A flood can't starve the rest of the host.
systemd.services."container@umami".serviceConfig = {
MemoryMax = "1G";
CPUQuota = "100%";
};
}
+4
View File
@@ -2,4 +2,8 @@
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
services.journald.extraConfig = ''
SystemMaxUse=1G
'';
}
+4 -3
View File
@@ -2,20 +2,21 @@
{
imports = [
./hardware-configuration
./hardware.nix
./systemd.nix
./services
];
skyg.user.enable = true;
skyg.nixos.common.ssh-server.enable = true;
skyg.nixos.common.diagnix.enable = true;
skyg.nixos.common.dns.enable = true;
skyg.server.dns.routing = {
enable = false;
openFirewall = true;
addressesSecretName = "dns-addresses.conf";
};
skyg.nixos.common.containers.openMetricsPort = true;
skyg.server.exporters.enable = true;
skyg.nixos.server.k3s = {
enable = true;
envPath = "/opt/k3s/k3s.env";
-4
View File
@@ -1,4 +0,0 @@
{ ... }:
{
services.fwupd.enable = true;
}
+129
View File
@@ -0,0 +1,129 @@
{
layer4 {
:22 {
route {
proxy {$GITEA_IP}:22
}
}
}
}
# Common: the wildcard cert.
(shared) {
tls /etc/caddy/tls/fullchain.pem /etc/caddy/tls/key.pem
}
# Only LAN (10/8) + Tailscale clients. Others get dropped.
(lan_only) {
import shared
@notlan not remote_ip 10.0.0.0/8 100.64.0.0/10
abort @notlan
}
# Open to anyone who can reach caddy.
(public_access) {
import shared
}
nvr.home.sosnovsky.ca {
import lan_only
reverse_proxy {$NVR_IP}:11080
}
jellyfin.home.sosnovsky.ca {
import public_access
reverse_proxy {$JELLYFIN_IP}:8096
}
castle.home.sosnovsky.ca {
import public_access
reverse_proxy castle.hub.internal
}
immich.home.sosnovsky.ca {
import lan_only
reverse_proxy {$IMMICH_IP}:2283
}
portainer.home.sosnovsky.ca {
import lan_only
reverse_proxy {$PORTAINER_IP}:9000
}
gitea.skyg.ca {
tls /etc/caddy/tls/gitea/fullchain.pem /etc/caddy/tls/gitea/key.pem
reverse_proxy {$GITEA_IP}:80
}
looprails.skyg.ca {
tls /etc/caddy/tls/gitea/fullchain.pem /etc/caddy/tls/gitea/key.pem
# Telemetry: only looprail's own requests reach Umami.
@telemetry {
method POST
path /t/v1
header Content-Type application/json*
header User-Agent looprail/*
header X-Looprail-Telemetry {$LOOPRAIL_TELEMETRY_KEY}
}
handle @telemetry {
request_body {
max_size 256KB
}
rewrite * /api/batch
reverse_proxy {$UMAMI_IP}:3000 {
# Umami never sees the sender's IP.
header_up -X-Forwarded-For
header_up -X-Real-IP
header_up -Forwarded
header_up -CF-Connecting-IP
header_up -True-Client-IP
header_up -X-Client-IP
header_up -X-Looprail-Telemetry
# One connection per request, so Umami's rate limit counts requests.
transport http {
keepalive off
}
}
}
handle /t/* {
respond 404
}
handle {
root * /srv/looprails
redir /looprail.html / permanent
file_server
}
}
# Umami dashboard for LoopRail telemetry, LAN only.
umami.home.sosnovsky.ca {
import lan_only
reverse_proxy {$UMAMI_IP}:3000
}
# Buzz: straight to its own caddy, LAN only.
buzz.home.sosnovsky.ca {
import lan_only
reverse_proxy https://{$BUZZ_IP}:443 {
header_up Host {http.request.host}
transport http {
tls
tls_server_name {http.request.host}
}
}
}
# Fallback: any other *.home.sosnovsky.ca host goes to the k8s Traefik.
# Host + SNI are preserved so Traefik routes on the original hostname.
*.home.sosnovsky.ca {
import lan_only
reverse_proxy https://{$K8S_INGRESS}:443 {
header_up Host {http.request.host}
transport http {
tls
tls_server_name {http.request.host}
}
}
}
+1
View File
@@ -11,6 +11,7 @@
orderBefore = [ "container-services-caddy" ];
};
certs."gitea.skyg.ca" = {
extraDomains = [ "looprails.skyg.ca" ];
postRun = "${pkgs.docker}/bin/docker restart caddy-caddy-1";
orderBefore = [ "container-services-caddy" ];
};
+28 -45
View File
@@ -1,11 +1,17 @@
{ config, ... }:
{ config, looprail, pkgs, ... }:
let
looprailPackages = looprail.packages.${pkgs.stdenv.hostPlatform.system};
app = config.skyg.internalNetworkingMap.apps.caddy;
nvr = config.skyg.internalNetworkingMap.apps.nvr;
jellyfin = config.skyg.internalNetworkingMap.apps.jellyfin;
immich = config.skyg.internalNetworkingMap.apps.immich;
portainer = config.skyg.internalNetworkingMap.apps.portainer;
buzz = config.skyg.internalNetworkingMap.apps.buzz;
publicGitea = config.skyg.internalNetworkingMap.apps.public-gitea;
umami = config.skyg.internalNetworkingMap.apps.umami;
# Sent by release looprail binaries on telemetry posts. It ships in the
# binary, so it only filters out scanners; it is not a secret.
looprailTelemetryKey = "70c685d238cc9ec7229e557a8de7b0d25527b1a402805251";
certDomain = "home.sosnovsky.ca";
giteaCertDomain = "gitea.skyg.ca";
# k8s Traefik ingress — fallback for hosts caddy doesn't handle itself.
@@ -18,53 +24,30 @@ in
networks.lan = config.skyg.nixos.common.containers.networks.ipvlanLab.compose;
services.caddy = {
image = "livekit/caddyl4:v2.11.3";
extraConfig.entrypoint = [ "caddy" ];
extraConfig = {
entrypoint = [ "caddy" ];
dns = [ config.skyg.internalNetworkingMap.appNetwork.gateway ];
};
command = [ "run" "--config" "/etc/caddy/Caddyfile" "--adapter" "caddyfile" ];
networks.lan.ipv4_address = app.ip;
files."/etc/caddy/Caddyfile" = ''
{
layer4 {
:22 {
route {
proxy ${publicGitea.ip}:22
}
}
}
}
nvr.home.sosnovsky.ca {
tls /etc/caddy/tls/fullchain.pem /etc/caddy/tls/key.pem
reverse_proxy ${nvr.ip}:11080
}
jellyfin.home.sosnovsky.ca {
tls /etc/caddy/tls/fullchain.pem /etc/caddy/tls/key.pem
reverse_proxy bigbox1.lab.internal:8096
}
immich.home.sosnovsky.ca {
tls /etc/caddy/tls/fullchain.pem /etc/caddy/tls/key.pem
reverse_proxy ${immich.ip}:2283
}
portainer.home.sosnovsky.ca {
tls /etc/caddy/tls/fullchain.pem /etc/caddy/tls/key.pem
reverse_proxy ${portainer.ip}:9000
}
gitea.skyg.ca {
tls /etc/caddy/tls/gitea/fullchain.pem /etc/caddy/tls/gitea/key.pem
reverse_proxy ${publicGitea.ip}:80
}
# Fallback: any other *.home.sosnovsky.ca host goes to the k8s Traefik.
# Host + SNI are preserved so Traefik routes on the original hostname.
*.home.sosnovsky.ca {
tls /etc/caddy/tls/fullchain.pem /etc/caddy/tls/key.pem
reverse_proxy https://${k8sIngress}:443 {
header_up Host {http.request.host}
transport http {
tls
tls_server_name {http.request.host}
}
}
}
'';
# Routes live in ./Caddyfile; IPs come in as env vars.
files."/etc/caddy/Caddyfile" = builtins.readFile ./Caddyfile;
environment = {
GITEA_IP = publicGitea.ip;
NVR_IP = nvr.ip;
IMMICH_IP = immich.ip;
PORTAINER_IP = portainer.ip;
JELLYFIN_IP = jellyfin.ip;
BUZZ_IP = buzz.ip;
UMAMI_IP = umami.ip;
LOOPRAIL_TELEMETRY_KEY = looprailTelemetryKey;
K8S_INGRESS = k8sIngress;
};
volumes = [
(if looprailPackages ? looprail-site then
"${looprailPackages.looprail-site}:/srv/looprails:ro"
else
"${looprail}/docs/looprail.html:/srv/looprails/index.html:ro")
"/var/lib/acme/${certDomain}/fullchain.pem:/etc/caddy/tls/fullchain.pem:ro"
"/var/lib/acme/${certDomain}/key.pem:/etc/caddy/tls/key.pem:ro"
"/var/lib/acme/${giteaCertDomain}/fullchain.pem:/etc/caddy/tls/gitea/fullchain.pem:ro"
+1
View File
@@ -2,6 +2,7 @@
imports = [
./caddy.nix
./acme.nix
./linux-tracker.nix
# ./buildbot.nix
];
}
@@ -0,0 +1,18 @@
{ config, ... }:
{
services.skyg-linux-tracker = {
enable = true;
bind = "0.0.0.0";
openFirewall = true;
docker.enable = config.virtualisation.docker.enable;
# Reachable only by its lab FQDN; the short name does not resolve.
allowedHosts = [ "minipc3.lab.internal" ];
# OTLP out to the collector on minipc1.
settings.otel = {
enabled = true;
endpoint = "http://minipc1.lab.internal:4317";
protocol = "grpc";
export_logs = true;
};
};
}
+1
View File
@@ -13,6 +13,7 @@
minimal = true;
fonts.minimal = true;
ssh-server.enable = true;
diagnix.enable = true;
containers.enable = false;
networking.nfsServer.enable = false;
hardware.pipewire.enable = true;
+1
View File
@@ -10,6 +10,7 @@
user.enable = true;
nixos = {
common.ssh-server.enable = true;
common.diagnix.enable = true;
common.hardware.pipewire.enable = true;
desktop = {
enable = true;
+1 -3
View File
@@ -15,12 +15,12 @@ in
imports = [
./services.nix
./hardware-configuration
./hardware.nix
./systemd.nix
];
skyg.user.enable = true;
skyg.nixos.common.ssh-server.enable = true;
skyg.nixos.common.diagnix.enable = true;
skyg.server.dns.routing = {
enable = false;
openFirewall = true;
@@ -28,8 +28,6 @@ in
};
skyg.nixos.desktop.enable = false;
skyg.server.admin.enable = true;
skyg.server.exporters.enable = true;
environment.systemPackages = with pkgs; [ btrfs-progs ];
networking.firewall.allowedUDPPorts = openPorts;
-4
View File
@@ -1,4 +0,0 @@
{ ... }:
{
services.fwupd.enable = true;
}
+14
View File
@@ -1,6 +1,20 @@
{ ... }:
{
skyg.nixos.common.networking.nfsServer.enable = true;
services.skyg-linux-tracker = {
enable = true;
bind = "0.0.0.0";
openFirewall = true;
# Reachable only by its lab FQDN; the short name does not resolve.
allowedHosts = [ "terra1.lab.internal" ];
# OTLP out to the collector on minipc1.
settings.otel = {
enabled = true;
endpoint = "http://minipc1.lab.internal:4317";
protocol = "grpc";
export_logs = true;
};
};
services.nfs.server = {
lockdPort = 4001;
mountdPort = 4002;
+2 -2
View File
@@ -8,7 +8,7 @@ All reusable NixOS and Home Manager modules. Every host gets the full module tre
```
modules/
├── lib.nix # makeNixOs / makeIso / makeHomeManagerUsers / makeDarwinModule / eachSystem
│ # (registers flake-input NixOS modules: tether → programs.tether.*,
│ # (registers flake-input NixOS modules:
│ # hhstream → services.hyprland-headless-stream)
├── main.nix # Base module imported by every host: core/ + nixos/ + network-drives.nix
│ # + skyg.internalNetworkingMap (global app registry + appNetwork)
@@ -23,7 +23,7 @@ modules/
│ ├── common/ # Core system settings, networking, SSH, QEMU, fonts, hardware
│ ├── server/ # Server services: K3s/K8s, DNS, AI stack, ARRs, media…
│ └── desktop/ # Desktop: tiler (niri/hyprland), packages, theming, crypto
└── openwrt/ # OpenWrt router config generator
├── openwrt/ # OpenWrt router config generator
```
## Option Namespace
+2 -1
View File
@@ -28,7 +28,8 @@ core/
- **Substituters** (`nix-substituters.nix`): the standing list of caches (local `minipc1`
and `bigbox2` caches, cache.nixos.org, cachix caches for cuda/cosmic/ai/noctalia/nixarchy,
flox, devenv) and the trusted public keys. Extra entries can be appended per-host via
`skyg.core.substituters.{urls,keys}`.
`skyg.core.substituters.{urls,keys}`. Also sets `http-connections = 8` and
`download-attempts = 10` so flaky links (Wi-Fi) don't disable cache.nixos.org mid-build.
- **Lab CA trust** (`lab-ca.nix`): adds `configs/pki/lab-ca.crt` to
`security.pki.certificateFiles` so every machine trusts the lab internal CA
(created by `skyg ca init`, see `configs/pki/ABOUTME.md`). Eval fails if the
+6 -2
View File
@@ -22,12 +22,16 @@
# colibrì (JustVugg/colibri) — GLM-5.2/OLMoE local inference, see pkgs/colibri.
colibri = final.callPackage ../../pkgs/colibri { };
colibri-rocm = final.callPackage ../../pkgs/colibri { backend = "rocm"; };
# llama.cpp v0.8.0 with DFlash2 speculative decoding, see pkgs/llama-cpp.
llama-cpp-halo = final.callPackage ../../pkgs/llama-cpp { };
llama-cpp-halo-cpu = final.callPackage ../../pkgs/llama-cpp { backend = "cpu"; };
llama-cpp-cuda = final.callPackage ../../pkgs/llama-cpp { backend = "cuda"; };
# Touchscreen gesture bridge for niri, see pkgs/niri-touchscreen-gestures.
niri-touchscreen-gestures = final.callPackage ../../pkgs/niri-touchscreen-gestures { };
# Buzz Desktop AppImage wrapper, see pkgs/buzz-desktop.
buzz-desktop = final.callPackage ../../pkgs/buzz-desktop { };
# Superset Desktop AppImage wrapper, see pkgs/superset-desktop.
superset-desktop = final.callPackage ../../pkgs/superset-desktop { };
# Buzz CLI (`buzz`), built from source, see pkgs/buzz-cli.
buzz-cli = final.callPackage ../../pkgs/buzz-cli { };
# Delta Editor (Zed Industries) prebuilt tarball, see pkgs/delta-editor.
delta-editor = final.callPackage ../../pkgs/delta-editor { };
+2
View File
@@ -53,6 +53,8 @@ in
"cache.nixos-cuda.org:74DUi4Ye579gUqzH4ziL9IyiJBlDpMRn9MBN8oNan9M="
] ++ cfg.keys;
nix.settings.trusted-users = [ "root" skygUser.name ];
nix.settings.http-connections = 8;
nix.settings.download-attempts = 10;
nix.extraOptions = ''
# Ensure we can still build when missing-server is not accessible
fallback = true
+2 -2
View File
@@ -32,7 +32,7 @@ let
colibri = final.callPackage ../pkgs/colibri { };
niri-touchscreen-gestures = final.callPackage ../pkgs/niri-touchscreen-gestures { };
buzz-desktop = final.callPackage ../pkgs/buzz-desktop { };
superset-desktop = final.callPackage ../pkgs/superset-desktop { };
buzz-cli = final.callPackage ../pkgs/buzz-cli { };
delta-editor = final.callPackage ../pkgs/delta-editor { };
})
];
@@ -49,8 +49,8 @@ let
specialArgs.dank-greeter.nixosModules.default
specialArgs.nix-index-database.nixosModules.nix-index
specialArgs.hermes-agent.nixosModules.default
specialArgs.tether.nixosModules.default
specialArgs.hhstream.nixosModules.default
specialArgs.skyg-linux-tracker.nixosModules.default
{ programs.nix-index-database.comma.enable = true; }
];
makeHomeConfig = {}: import ./home { };
+5
View File
@@ -110,6 +110,9 @@ in
gitea = { ip = "10.0.101.8"; };
public-gitea = { ip = "10.0.101.9"; };
immich = { ip = "10.0.101.10"; };
immich-ml = { ip = "10.0.101.11"; };
gilix = { ip = "10.0.101.13"; };
umami = { ip = "10.0.101.14"; };
jellyfin = { ip = "10.0.101.5"; };
nvr = { ip = "10.0.101.6"; };
portainer = { ip = "10.0.101.241"; };
@@ -121,6 +124,8 @@ in
"portainer.home.sosnovsky.ca"
"immich.home.sosnovsky.ca"
"gitea.skyg.ca"
"looprails.skyg.ca"
"umami.home.sosnovsky.ca"
];
};
};
Loaded 100 of 185 files, more files were not shown because too many files have changed in this diff. Show more