Commit graph

74 commits

Author SHA1 Message Date
aee59ff0b2 qs-ask: disable thinking — 2.4x faster, same answers
Profiled where the ~6s actually went, and it was not where I assumed.
Haiku defaults to extended thinking, so it spent 225 output tokens and
1.9s deliberating before emitting an 80-character answer about the height
of a tower. MAX_THINKING_TOKENS=0: 43 output tokens, time-to-first-text
2657ms -> 1122ms, wall clock 5.7s -> ~2.4s, answer unchanged.

Two things measured NOT to be the bottleneck, recorded in the comment so
nobody optimises them later: process startup (0.12s boot plus 28ms to
fire the request, so a warm/persistent process saves nothing) and prompt
size (184 input tokens, no bloat to trim).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-01 17:49:44 +01:00
309c54d31b qs-ask: answer via Claude Code on the subscription, not an API key
No API key and no separate billing: qs-ask now shells out to `claude -p`,
which draws on the existing subscription already authenticated on this
host. The trade is latency — Claude Code boots a Node process per
question, ~6s measured against the raw API's ~1s — so the launcher now
races Wikipedia and Claude instead of chaining them. Wikipedia fills the
card in under a second and Claude supersedes it on arrival; chaining
would have left the card blank for six seconds on every question.

Isolation, verified: --safe-mode drops CLAUDE.md, skills, hooks, plugins
and MCP while leaving auth working, which matters for correctness and not
just speed — the global CLAUDE.md here asks for caveman-mode replies and
that would have leaked into answers. --no-session-persistence writes no
transcript, and a dedicated empty cwd keeps launcher questions out of any
project's history or auto-memory. Confirmed no project namespace, no
transcript and no memory write after a run.

Not --bare, which looks right and is a trap: its auth is strictly
ANTHROPIC_API_KEY, so it cannot use the subscription at all.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-01 17:34:50 +01:00
dbed82bab4 qs-ask: report why it went quiet on stderr
Silence on stdout is the launcher's fall-back-to-Wikipedia signal, so it
has to stay clean — but that made a misconfigured key indistinguishable
from a working fallback. Every reason now prints on stderr, which the
launcher discards and a human running qs-ask by hand can read.

Drops curl -f so a 4xx body's own error message ("API key is invalid.")
surfaces instead of just an exit code, and guards the specific mistake of
pasting the sk-ant-... placeholder literally.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-01 17:21:05 +01:00
958dc9b333 quickshell: Claude-backed launcher answers via the mediaserver
Adds qs-ask on the mediaserver — the Anthropic key lives there and nowhere
else, so neither desktop holds a credential and there's one place to
rotate it. The launcher pipes the question over the same SSH path the
server monitor already uses; the query goes over stdin because
`ssh host cmd arg` would re-parse arg through the remote shell.

Claude answers first, Wikipedia is the fallback. The script is the
feature gate: with no key it exits silently, which is the same signal as
a failed call or an UNKNOWN reply, so the Wikipedia path stays the
default with zero configuration. The card names whichever answered.

Haiku 4.5, no thinking and no effort (effort errors on Haiku) — a
one-sentence fact needs no reasoning tokens. ~$0.0005 per query.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-01 17:14:04 +01:00
a7976205a8 qs-stats: single writer, fix @STAT pipe race
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 20:47:39 +01:00
72864463d0 server monitor: qs-stats stream adds cpu temp + wan throughput
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 20:32:43 +01:00
8dd70a2d9d mediaserver: drop no-op firewall rules, close unused DR forwards
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 10:00:49 +01:00
7146030074 fix auto-upgrade running before flake.lock update
Remove unnecessary --impure from update alias, shift
auto-upgrade from 04:15 to 05:15 so it runs after the
Forgejo bot updates flake.lock at 04:00 UTC (05:00 BST).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 09:34:39 +01:00
8560c11afa fix NIC naming: use udev rules instead of .link files
systemd.network.links didn't generate files; use udev extraRules
to pin NIC names to MACs. Also disable networking.useDHCP catch-all
that silently misconfigured the LAN NIC when it got a wrong name.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-22 09:31:57 +01:00
1aebc200b6 remove matugen remnants — theming is now handled by stylix
Delete 8 unused matugen template files, remove the matugen package,
homepage custom.css watcher infrastructure, and the wallpaper shell
function. Update remaining comments to reference stylix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-20 17:45:11 +01:00
ced2ff65dc Add autoupdate. 2026-05-19 17:10:17 +01:00
b713d64211 stylix: enable on media server via stylix-stable (release-25.11)
Add a stylix-stable input pinned to release-25.11 so the media server
gets Stylix theming without pulling in unstable nixpkgs. btop is now
managed by Home Manager on all hosts with Stylix auto-theming.

Desktop-only config (Zen/Vesktop CSS, GTK icons) is guarded behind
an isDesktop check in stylix.nix.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-18 13:53:19 +01:00
8943ea3021 2026-05-14 12:54:19 +01:00
34e32e7ce4 Remove shitty ollama. 2026-05-13 10:24:14 +01:00
6252eda060 Removing leftover cuda stuff and adding vscodium to server for remote access. 2026-05-13 09:35:30 +01:00
b86a92293c ollama: build against CUDA 12.2 for Quadro M2000 compatibility
The M2000's legacy_535 driver caps CUDA support at 12.2; nixpkgs'
default ollama-cuda targets 12.8 (requires driver ≥570), causing
the runner to crash immediately. Override to CUDA 12.2 with sm_52
arch target to match Maxwell GM206 compute capability.

Also open port 11434 on the mediaserver firewall for remote ollama
access from other LAN hosts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 09:23:23 +01:00
9f0b220427 Corrected sensors. 2026-04-20 11:34:49 +01:00
50b66a3262 Adding sensors 2026-04-20 11:33:29 +01:00
97e4cd49d7 Adding usbutils 2026-04-20 11:19:11 +01:00
f57c6e99ec Add Last Update widget to Homepage via record-update script
record-update parses nvd diff after switch and writes latest.json;
Homepage polls a local-only nginx listener and renders date/changes/
closure/kernel via a customapi widget.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-16 20:58:19 +01:00
2096330eb8 Theme btop and Homepage via matugen on the mediaserver
Share the wallpaper symlink across all hosts by moving it from gnome.nix
into home-manager/fred.nix, and add matugen templates for btop and the
Homepage dashboard.

The Homepage NixOS module writes custom.css into /etc (read-only), so
bind-mount /var/lib/homepage-custom-css/custom.css over it. A systemd
path unit restarts homepage-dashboard whenever matugen rewrites the
file, so regeneration works without sudo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 20:17:38 +01:00
5f31149565 Skip actively seeded files in transcode-hevc via qBittorrent API
Queries qBittorrent for individual file sizes of all active torrents.
Files whose size matches a seeded torrent file are skipped, catching
cross-filesystem copies where hardlink detection doesn't work.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 19:31:37 +01:00
7fe1ccb8a7 Add transcode-hevc script for bulk H.264 to HEVC conversion
Resumable batch script that finds H.264 files, re-encodes to HEVC
(libx265 CRF 24), verifies duration, and replaces originals.
Tracks completed files in /var/lib/transcode-hevc/completed.log.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 10:25:36 +01:00
5d033a55ec 2026-04-09 10:09:24 +01:00
8b62397037 Remove Docker, add server migration checklist to readme
- Remove virtualisation.docker.enable (no longer used after native
  migration of Authelia, go2rtc, and nginx)
- Add migration checklist documenting which state directories and
  secrets to back up when moving to new hardware

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 22:54:33 +01:00
39450ca786 Remove Suricata/ELK; add SSH key auth and disable password login
Adds authorised keys for FredOS-Gaming and phone. Disables SSH password
authentication on FredOS-Mediaserver — key auth only going forward.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 21:48:08 +01:00
Claude
16363dc887
fail2ban: add jails for SSH, nginx proxy manager, and Jellyfin
Replaces bare enable flag with a dedicated service module covering:
- SSH brute force via journald
- Nginx Proxy Manager auth failures via Docker log files
- Jellyfin auth failures via journald
Includes incremental ban times (up to 1 week) and LAN ignore rules.

https://claude.ai/code/session_01PwAXuaoJx7qD5FhVLsn7Sn
2026-04-06 08:21:23 +00:00
93ea194da4 Reorganise hardware vs host config, tidy settings and services 2026-04-01 21:16:59 +01:00
901c9ee3b0
2026-03-30 21:43:15 +01:00
f256f145fd
2026-03-30 21:34:12 +01:00
e50696290c
2026-03-30 21:17:27 +01:00
c5a8722f1a
2026-03-30 20:49:30 +01:00
0d29ecb0dd
2026-03-28 15:37:15 +00:00
1552d8c38c
Update FredOS-Mediaserver.nix 2026-02-09 19:32:08 +00:00
efb0b5d262
Update FredOS-Mediaserver.nix 2026-01-26 15:22:01 +00:00
d6d8368e8b
Update FredOS-Mediaserver.nix 2026-01-25 16:40:19 +00:00
3c2febaa25
Update FredOS-Mediaserver.nix 2026-01-25 16:06:34 +00:00
ca93dea73a
Update FredOS-Mediaserver.nix 2026-01-25 16:01:40 +00:00
0688618add
Update FredOS-Mediaserver.nix 2026-01-23 09:13:54 +00:00
9ccbe9de20
Update FredOS-Mediaserver.nix 2026-01-20 21:38:23 +00:00
5a87aa08d3
Update FredOS-Mediaserver.nix 2026-01-20 21:17:34 +00:00
fdc8b680aa
Update FredOS-Mediaserver.nix 2026-01-20 21:07:36 +00:00
47804b8dac
Update FredOS-Mediaserver.nix 2026-01-20 19:37:48 +00:00
70c2dab246
Update FredOS-Mediaserver.nix 2026-01-20 19:37:16 +00:00
d70833c9ed
Update FredOS-Mediaserver.nix 2026-01-20 19:36:31 +00:00
6c0737cb41
Update FredOS-Mediaserver.nix 2026-01-20 19:35:09 +00:00
85a71a1097
Update FredOS-Mediaserver.nix 2026-01-20 19:34:13 +00:00
29774470ea
Update FredOS-Mediaserver.nix 2026-01-20 19:27:51 +00:00
8f80b4c681
Update FredOS-Mediaserver.nix 2026-01-20 16:15:09 +00:00
756dbdb785
Update FredOS-Mediaserver.nix 2026-01-20 16:14:25 +00:00