From 039e40271f45863bc9605049e5f4c35d8052cabc Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sun, 4 Oct 2026 23:50:56 +0200 Subject: [PATCH 01/15] =?UTF-8?q?omp:=20add=20feature=20workflow=20prompt?= =?UTF-8?q?=20(recon=20=E2=86=92=20plan=20=E2=86=92=20review=20=E2=86=92?= =?UTF-8?q?=20implement=20=E2=86=92=20review/fix)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/dotfiles/omp/prompts/feature.md | 74 +++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 modules/dotfiles/omp/prompts/feature.md diff --git a/modules/dotfiles/omp/prompts/feature.md b/modules/dotfiles/omp/prompts/feature.md new file mode 100644 index 0000000..be6ddc6 --- /dev/null +++ b/modules/dotfiles/omp/prompts/feature.md @@ -0,0 +1,74 @@ +--- +description: "Full feature cycle: recon → plan → plan review → approval → implement (parallel when worthwhile) → review/fix loop" +--- +Feature workflow for: + +$@ + +You are the orchestrator. Run each stage with the `task` tool and the named agent. Hand off through `local://` files, not pasted text; subagents share your `local://` root. + +Caps are ceilings, not targets. Take the shortest path the exit conditions allow; the expected path is one pass with no loops. + +## 0. Intake (you) +- Restate the goal as numbered acceptance criteria. Ask only if ambiguity would change the plan. +- Detect VCS: jj if `jj root` succeeds, else git. +- Record the base revision (jj: `jj log -r @- --no-graph -T commit_id`; git: `git rev-parse HEAD`) and any files already changed before starting (jj: `jj diff --name-only`; git: `git status --porcelain`). +- Size the feature: **small** (one area, few files) or **large**. Size drives scout count, plan-review skip, and parallelism. +- Write goal, criteria, VCS, base revision, and pre-existing changes to `local://feature-brief.md`. + +## 1. Recon +- `l-scout-handoff`: one per distinct code area for large features (parallel, one `task` batch); one for small features. +- Merge results into `local://feature-recon.md`. + +## 2. Plan +`l-planner` with brief + recon. In addition to its standard format, require: +- **Slices**: id, files owned (each file in at most one slice), depends-on, acceptance check. +- **Shared contracts**: types/interfaces/signatures used by more than one slice; "none" if none. +- **Validation**: exact build/test/lint commands. + +Write to `local://feature-plan.md`. + +## 3. Plan review +- Skip for small, low-risk plans (single slice, no shared contracts, no public API/schema/migration changes); say you skipped and why. +- Otherwise `l-expert` reviews the plan against brief and recon. Its output must start with `VERDICT: APPROVE` or `VERDICT: REVISE`, then **blocking issues** (only what would make the implementation wrong, unsafe, or incomplete) and **non-blocking notes**. APPROVE is the expected verdict when nothing is blocking. +- REVISE → `l-planner` addresses the blocking issues only → `l-expert` re-reviews. Max 2 review rounds; unresolved issues go to the checkpoint. +- Append non-blocking notes to the plan under "Notes for implementers". + +## 4. Checkpoint +Show: slices and waves, execution mode (single/parallel) and why, risks, unresolved blocking issues, pre-existing changes, plan path. + +Then use `ask` with options: +- **Approve & implement** → continue to stage 5. +- **Stop at plan** → end with the plan as the deliverable. +- Revision feedback arrives as custom input → `l-planner` revises; re-run `l-expert` only if the change is substantial; ask again. + +If `ask` is unavailable, end the turn with the same summary and resume from the user's reply. + +## 5. Implement +Choose the mode: +- **Single** (default): one `l-worker` executes the whole plan. +- **Parallel**: only if ≥2 slices own disjoint files and each is substantial. Then: + - Wave 0: shared contracts, one `l-worker` (skip if none). + - Waves 1..N in dependency order; slices within a wave run as parallel `l-worker`s in one `task` batch. + - Each worker gets the plan path, its slice, and its owned files. It must not edit files outside its ownership; if it needs to, it stops and reports, and you reassign. + - Between waves, run a quick typecheck/build only when the next wave depends on this wave's code. + +All workers: no builds, tests, or formatters mid-flight; report files changed and key symbols touched. + +## 6. Integrate +Run the plan's validation commands once (yourself or one `l-worker`). Fix integration failures with one `l-worker` until green; if blocked, report exactly what fails. + +## 7. Review / fix loop +- `l-reviewer` gets brief, plan, VCS, base revision, and pre-existing changes to exclude. It reviews the diff from base for bugs, security, maintainability, and conformance to plan and acceptance criteria. An empty Critical section is a normal outcome. +- No Critical and no Warnings → done. +- Otherwise one `l-worker` fixes Critical and Warnings only (not Suggestions), then reruns validation. +- Re-review only if a Critical was fixed, ≥3 Warnings were fixed, or the fix diff goes beyond localized edits. Re-review scope: previous findings + fix diff; it verifies resolution, and only new Critical issues reopen the loop. +- Max 3 review rounds. If Criticals remain after round 2, use `l-expert` for the final round. After the cap, stop and report unresolved issues. + +## 8. Report +- Files changed and what changed. +- Acceptance criteria status, one line each. +- Validation commands run and results. +- Review rounds and outcome; unresolved issues and risks. + +Do not commit, squash, describe, or push; leave VCS state to the user. From 24524cd276e3216f3f6f8105746d8988cef7523d Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sun, 4 Oct 2026 23:50:56 +0200 Subject: [PATCH 02/15] omp: make l-reviewer VCS-agnostic (jj or git) --- modules/dotfiles/omp/agents/l-reviewer.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/dotfiles/omp/agents/l-reviewer.md b/modules/dotfiles/omp/agents/l-reviewer.md index a333713..1d81a98 100644 --- a/modules/dotfiles/omp/agents/l-reviewer.md +++ b/modules/dotfiles/omp/agents/l-reviewer.md @@ -13,11 +13,13 @@ thinkingLevel: medium You are a senior code reviewer. Analyze code for quality, security, and maintainability. -Bash is for read-only commands only: `git diff`, `git log`, `git show`. Do NOT modify files or run builds. +Bash is for read-only commands only. Do NOT modify files, run builds, or run mutating VCS commands. Assume tool permissions are not perfectly enforceable; keep all bash usage strictly read-only. +Detect the VCS first: if `jj root` succeeds, the repo is jj-backed — use `jj status`, `jj diff --git`, `jj log`, `jj show`. Otherwise use `git status`, `git diff`, `git log`, `git show`; `git diff` omits untracked files, so read new files listed by `git status --porcelain` too. + Strategy: -1. Run `git diff` to see recent changes (if applicable) +1. If given a diff scope (base revision, files, exclusions), review exactly that (`jj diff --git --from ` / `git diff `); otherwise review the working-copy changes 2. Read the modified files 3. Check for bugs, security issues, code smells From a0f4999dbe10b632b3f073e82e725f8630a86667 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sun, 4 Oct 2026 23:50:56 +0200 Subject: [PATCH 03/15] aerospace: move Codex to C, Claude to F, add WhatsApp/Reminders to E --- hosts/thegeneralist-mbp/aerospace.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hosts/thegeneralist-mbp/aerospace.nix b/hosts/thegeneralist-mbp/aerospace.nix index e856302..23576ff 100644 --- a/hosts/thegeneralist-mbp/aerospace.nix +++ b/hosts/thegeneralist-mbp/aerospace.nix @@ -215,9 +215,11 @@ { "if".app-id = "net.imput.helium"; run = "move-node-to-workspace W"; } { "if".app-id = "com.stablyai.orca"; run = "move-node-to-workspace S"; } { "if".app-id = "md.obsidian"; run = "move-node-to-workspace Q"; } - { "if".app-id = "com.openai.codex"; run = "move-node-to-workspace D"; } - { "if".app-id = "com.anthropic.claudefordesktop"; run = "move-node-to-workspace C"; } + { "if".app-id = "com.openai.codex"; run = "move-node-to-workspace C"; } + { "if".app-id = "com.anthropic.claudefordesktop"; run = "move-node-to-workspace F"; } { "if".app-id = "com.apple.mail"; run = "move-node-to-workspace M"; } + { "if".app-id = "net.whatsapp.WhatsApp"; run = "move-node-to-workspace E"; } + { "if".app-id = "com.apple.reminders"; run = "move-node-to-workspace E"; } { "if".app-id = "io.tailscale.ipn.macsys"; run = "move-node-to-workspace 9"; } { "if".app-id = "com.softissimo.ReversoContext.macosapp"; run = "move-node-to-workspace 9"; } { "if".app-id = "com.pais.handy"; run = "move-node-to-workspace 9"; } From 6fa203a8fae2a445ba7d4447c9e6cc5c13662044 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sun, 4 Oct 2026 23:50:56 +0200 Subject: [PATCH 04/15] karabiner: add Hyper+1-4 input source switching, move Claude to Hyper+F, update Logitech mouse product id --- modules/darwin/karabiner.nix | 63 +++++++++++++++++++++++++++++++++--- 1 file changed, 58 insertions(+), 5 deletions(-) diff --git a/modules/darwin/karabiner.nix b/modules/darwin/karabiner.nix index 9f4bc1a..561b916 100644 --- a/modules/darwin/karabiner.nix +++ b/modules/darwin/karabiner.nix @@ -118,7 +118,7 @@ let logitechMouseIdentifiers = { vendor_id = 1133; - product_id = 50503; + product_id = 50504; is_pointing_device = true; }; @@ -341,6 +341,59 @@ let } ]; } + { + description = "Hyper+1/2/3/4 select English, Russian, German, or Azerbaijani input"; + manipulators = [ + { + from = { + key_code = "1"; + modifiers.mandatory = hyperModifiers; + }; + to = [ + { + select_input_source.input_source_id = "com.apple.keylayout.US"; + } + ]; + type = "basic"; + } + { + from = { + key_code = "2"; + modifiers.mandatory = hyperModifiers; + }; + to = [ + { + select_input_source.input_source_id = "com.apple.keylayout.RussianWin"; + } + ]; + type = "basic"; + } + { + from = { + key_code = "3"; + modifiers.mandatory = hyperModifiers; + }; + to = [ + { + select_input_source.input_source_id = "com.apple.keylayout.German-DIN-2137"; + } + ]; + type = "basic"; + } + { + from = { + key_code = "4"; + modifiers.mandatory = hyperModifiers; + }; + to = [ + { + select_input_source.input_source_id = "com.apple.keylayout.Azeri"; + } + ]; + type = "basic"; + } + ]; + } { description = "Hyper+Return opens cmux"; manipulators = [ @@ -601,11 +654,11 @@ let ]; } { - description = "Hyper+V opens or focuses Claude app"; + description = "Hyper+F opens or focuses Claude app"; manipulators = [ { from = { - key_code = "v"; + key_code = "f"; modifiers = { mandatory = hyperModifiers; }; @@ -620,11 +673,11 @@ let ]; } { - description = "Shift+Hyper+V opens Claude web"; + description = "Shift+Hyper+F opens Claude web"; manipulators = [ { from = { - key_code = "v"; + key_code = "f"; modifiers = { mandatory = hyperModifiers ++ [ "left_shift" ]; }; From 7f0a705083d5f416e5f0298bccce8e4a6a3e64df Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sun, 4 Oct 2026 23:50:56 +0200 Subject: [PATCH 05/15] ghostty: disable custom shader --- modules/common/ghostty.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/common/ghostty.nix b/modules/common/ghostty.nix index f6785bf..9181659 100644 --- a/modules/common/ghostty.nix +++ b/modules/common/ghostty.nix @@ -25,7 +25,7 @@ gtk-titlebar = false; mouse-hide-while-typing = true; - custom-shader = "~/.config/ghostty-shaders/shader.glsl"; + # custom-shader = "~/.config/ghostty-shaders/shader.glsl"; }; }; }]; From 055e63945d5c1f5ef418b64aaa4c6fb74c2d214f Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sun, 4 Oct 2026 23:50:56 +0200 Subject: [PATCH 06/15] jujutsu: sign all commits with SSH key --- modules/common/jujutsu.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/common/jujutsu.nix b/modules/common/jujutsu.nix index 3ec91c5..10c5f08 100644 --- a/modules/common/jujutsu.nix +++ b/modules/common/jujutsu.nix @@ -29,6 +29,12 @@ in }; remotes.origin.auto-track-bookmarks = "glob:*"; + + signing = { + sign-all = true; + backend = "ssh"; + key = "~/.ssh/id_ed25519"; + }; }; }; } From 7f5ecd917ba69f80bb049b82408b86f495227aad Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Sun, 4 Oct 2026 23:50:56 +0200 Subject: [PATCH 07/15] nushell: disable osc9_9 shell integration --- modules/common/shell/0_nushell.nu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/common/shell/0_nushell.nu b/modules/common/shell/0_nushell.nu index 6c333fb..8862c69 100644 --- a/modules/common/shell/0_nushell.nu +++ b/modules/common/shell/0_nushell.nu @@ -30,7 +30,7 @@ $env.config.use_kitty_protocol = true $env.config.shell_integration.osc2 = true $env.config.shell_integration.osc7 = true $env.config.shell_integration.osc8 = true -$env.config.shell_integration.osc9_9 = true +$env.config.shell_integration.osc9_9 = false $env.config.shell_integration.osc133 = true $env.config.shell_integration.osc633 = true $env.config.shell_integration.reset_application_mode = true From bd887883f753f2df270ae4844cd25bf065cd0719 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 9 Oct 2026 14:21:55 +0200 Subject: [PATCH 08/15] nixos: migrate server services to thegeneralist Move hosted services and secrets from the retired central hosts, persist USB storage and ownership, harden RTL8822BU Wi-Fi, repair DNS behavior, and order CoreDNS after Tailscale. --- AGENTS.md | 2 - docs/README.md | 20 +-- .../configuration.nix | 34 ---- hosts/thegeneralist-central-mbp/default.nix | 1 - .../hardware-configuration.nix | 11 -- hosts/thegeneralist-central/cftoken.age | 6 - hosts/thegeneralist-central/configuration.nix | 153 ------------------ .../credentials_personal.age | 5 - hosts/thegeneralist-central/default.nix | 1 - .../forgejo-family-site-deploy-token.age | 6 - .../hardware-configuration.nix | 75 --------- hosts/thegeneralist-central/hostkey.age | Bin 631 -> 0 bytes .../openclaw-documents/AGENTS.md | 33 ---- .../openclaw-documents/SOUL.md | 22 --- .../openclaw-documents/TOOLS.md | 47 ------ hosts/thegeneralist-central/password.age | 5 - .../acme/acmeEnvironment.age | Bin .../acme/default.nix | 0 .../archive/archivebox.nix | 2 +- .../archive/default.nix | 4 +- .../cache/default.nix | 0 .../cache/key.age | 0 .../cert.pem.age | Bin hosts/thegeneralist/configuration.nix | 66 +++++++- .../credentials.age | Bin .../dns.nix | 17 +- .../forgejo/default.nix | 40 +++-- .../forgejo/forgejo-runner-token.age | 0 .../thegeneralist/hardware-configuration.nix | 19 +++ .../jellyfin/default.nix | 24 ++- .../plex/default.nix | 49 +----- .../readlater-bot-sync-token.age | 0 .../readlater-bot-token.age | 0 .../readlater-bot-user-id.age | 0 .../site.nix | 0 modules/common/llm.nix | 8 +- modules/common/nix.nix | 11 +- modules/linux/dns.nix | 4 +- modules/linux/networking.nix | 4 +- modules/linux/printers.nix | 6 +- secrets.nix | 19 +-- 41 files changed, 183 insertions(+), 511 deletions(-) delete mode 100644 hosts/thegeneralist-central-mbp/configuration.nix delete mode 100644 hosts/thegeneralist-central-mbp/default.nix delete mode 100644 hosts/thegeneralist-central-mbp/hardware-configuration.nix delete mode 100644 hosts/thegeneralist-central/cftoken.age delete mode 100644 hosts/thegeneralist-central/configuration.nix delete mode 100644 hosts/thegeneralist-central/credentials_personal.age delete mode 100644 hosts/thegeneralist-central/default.nix delete mode 100644 hosts/thegeneralist-central/forgejo/forgejo-family-site-deploy-token.age delete mode 100644 hosts/thegeneralist-central/hardware-configuration.nix delete mode 100644 hosts/thegeneralist-central/hostkey.age delete mode 100644 hosts/thegeneralist-central/openclaw-documents/AGENTS.md delete mode 100644 hosts/thegeneralist-central/openclaw-documents/SOUL.md delete mode 100644 hosts/thegeneralist-central/openclaw-documents/TOOLS.md delete mode 100644 hosts/thegeneralist-central/password.age rename hosts/{thegeneralist-central => thegeneralist}/acme/acmeEnvironment.age (100%) rename hosts/{thegeneralist-central => thegeneralist}/acme/default.nix (100%) rename hosts/{thegeneralist-central => thegeneralist}/archive/archivebox.nix (93%) rename hosts/{thegeneralist-central => thegeneralist}/archive/default.nix (92%) rename hosts/{thegeneralist-central => thegeneralist}/cache/default.nix (100%) rename hosts/{thegeneralist-central => thegeneralist}/cache/key.age (100%) rename hosts/{thegeneralist-central => thegeneralist}/cert.pem.age (100%) rename hosts/{thegeneralist-central => thegeneralist}/credentials.age (100%) rename hosts/{thegeneralist-central => thegeneralist}/dns.nix (70%) rename hosts/{thegeneralist-central => thegeneralist}/forgejo/default.nix (76%) rename hosts/{thegeneralist-central => thegeneralist}/forgejo/forgejo-runner-token.age (100%) rename hosts/{thegeneralist-central => thegeneralist}/jellyfin/default.nix (61%) rename hosts/{thegeneralist-central => thegeneralist}/plex/default.nix (70%) rename hosts/{thegeneralist-central => thegeneralist}/readlater-bot-sync-token.age (100%) rename hosts/{thegeneralist-central => thegeneralist}/readlater-bot-token.age (100%) rename hosts/{thegeneralist-central => thegeneralist}/readlater-bot-user-id.age (100%) rename hosts/{thegeneralist-central => thegeneralist}/site.nix (100%) diff --git a/AGENTS.md b/AGENTS.md index 19781df..7febd65 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -21,6 +21,4 @@ This file provides minimal context for assistants working with this Nix config r - All others -> NixOS - Current hosts: - `thegeneralist` (NixOS) - - `thegeneralist-central` (NixOS) - `thegeneralist-mbp` (Darwin) - - `thegeneralist-central-mbp` (Darwin) diff --git a/docs/README.md b/docs/README.md index aa25237..dc1d1dc 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,8 +5,8 @@ A comprehensive Nix flake configuration supporting both NixOS (Linux) and nix-da ## Overview This configuration provides a unified way to manage multiple machines across different platforms: -- **NixOS hosts**: `thegeneralist`, `thegeneralist-central` -- **Darwin hosts**: `thegeneralist-mbp`, `thegeneralist-central-mbp` +- **NixOS hosts**: `thegeneralist` +- **Darwin hosts**: `thegeneralist-mbp` ## Quick Start @@ -121,7 +121,7 @@ Hosts are automatically categorized based on naming conventions: ### Common Modules Located in `modules/common/`, these are loaded on all systems: -- `nix.nix` - Nix configuration, caches, and distributed builds +- `nix.nix` - Nix configuration and binary caches - `home-manager.nix` - User environment management - `packages.nix` - Common packages - `git.nix`, `neovim.nix`, `zsh.nix` - Development tools @@ -152,12 +152,9 @@ Uses `agenix` for encrypted secrets management: 3. Edit secrets: `agenix -e secret-name.age` 4. Reference in configuration: `config.age.secrets.secret-name.path` -## Distributed Builds +## Builds and Binary Cache -The configuration includes distributed build support: -- `thegeneralist-central` serves as the build machine -- Other hosts can offload builds via SSH -- Shared binary caches for faster builds +`thegeneralist` performs its own x86_64 builds and serves the personal binary cache. ## Binary Caches @@ -226,10 +223,9 @@ darwin-rebuild switch --rollback 2. Re-encrypt secrets: `agenix -r` 3. Check file permissions on age keys -### Performance Issues -1. Enable distributed builds to `thegeneralist-central` -2. Verify binary cache access -3. Use `nh` for optimized rebuilds +### Performance Issues +1. Verify binary cache access +2. Use `nh` for optimized rebuilds ## Contributing diff --git a/hosts/thegeneralist-central-mbp/configuration.nix b/hosts/thegeneralist-central-mbp/configuration.nix deleted file mode 100644 index 704563d..0000000 --- a/hosts/thegeneralist-central-mbp/configuration.nix +++ /dev/null @@ -1,34 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ pkgs, ... }: - -{ - imports = [ ./hardware-configuration.nix ]; - - users.knownUsers = [ - "central" - ]; - - users.users.central = { - name = "central"; - home = "/Users/central"; - shell = pkgs.zsh; - uid = 502; - openssh.authorizedKeys.keys = let - inherit (import ../../keys.nix) thegeneralist; - in [ thegeneralist ]; - }; - - home-manager = { - backupFileExtension = "home.bak"; - users.central.home = { - stateVersion = "26.05"; - homeDirectory = "/Users/central"; - }; - }; - - system.primaryUser = "central"; - system.stateVersion = 6; -} diff --git a/hosts/thegeneralist-central-mbp/default.nix b/hosts/thegeneralist-central-mbp/default.nix deleted file mode 100644 index b3e0f0b..0000000 --- a/hosts/thegeneralist-central-mbp/default.nix +++ /dev/null @@ -1 +0,0 @@ -lib: inputs: self: lib.mkSystem "darwin" ./configuration.nix diff --git a/hosts/thegeneralist-central-mbp/hardware-configuration.nix b/hosts/thegeneralist-central-mbp/hardware-configuration.nix deleted file mode 100644 index bdd1ed5..0000000 --- a/hosts/thegeneralist-central-mbp/hardware-configuration.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ lib, ... }: - -{ - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - # networking.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "aarch64-darwin"; -} diff --git a/hosts/thegeneralist-central/cftoken.age b/hosts/thegeneralist-central/cftoken.age deleted file mode 100644 index 1c43e7e..0000000 --- a/hosts/thegeneralist-central/cftoken.age +++ /dev/null @@ -1,6 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 pp9qdQ OrqCuVIzHaavNZxpOXYlIcnrHJe5GOjtcIhmaw+8wHI -TQCYrhgm4O52QPodgSmFMvyw0Ln7n/+vFlGnONctPKk ---- jOnFOfG4YRnpvtmmoEVfbh3mAXtfcJiTjzja46xTKMk -Ï ÷r_z'Dx�’y2Ô—ÿƒG½8¹hë}=è‡EàK«[wÀ߯ìöaðÿBÞ -÷þH ħÿHîÆbE–ÿì9{´YS‚ÑΖJÞL>²ö¨êPÈÒ“m£ÿDšn¤BQ Qšš2êÕ¸·çW&uÒ‡X…¼òf»FUoj6Q3e4¡X¸* ‚Ý*ó*xÚÓÖ½©ç Cî±ÏýpÇ’ }”ÛVµ9~ =û`ô ½¦�’AÓI<.÷’GEÀ¨2­L1BM‡x›ÿW…½IlŸ–†Ü}2&±âïÖ \ No newline at end of file diff --git a/hosts/thegeneralist-central/configuration.nix b/hosts/thegeneralist-central/configuration.nix deleted file mode 100644 index 2575151..0000000 --- a/hosts/thegeneralist-central/configuration.nix +++ /dev/null @@ -1,153 +0,0 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ - config, - pkgs, - inputs, - lib, - ... -}: - -{ - imports = [ - ./hardware-configuration.nix - ./site.nix - ./cache - ./archive - ./forgejo - ]; - - age.secrets.password.file = ./password.age; - age.secrets.readlaterBotToken.file = ./readlater-bot-token.age; - age.secrets.readlaterBotSyncToken.file = ./readlater-bot-sync-token.age; - age.secrets.readlaterBotUserId.file = ./readlater-bot-user-id.age; - age.secrets.readlaterBotToken.owner = "thegeneralist"; - age.secrets.readlaterBotToken.group = "users"; - age.secrets.readlaterBotToken.mode = "0400"; - age.secrets.readlaterBotSyncToken.owner = "thegeneralist"; - age.secrets.readlaterBotSyncToken.group = "users"; - age.secrets.readlaterBotSyncToken.mode = "0400"; - age.secrets.readlaterBotUserId.owner = "thegeneralist"; - age.secrets.readlaterBotUserId.group = "users"; - age.secrets.readlaterBotUserId.mode = "0400"; - - users.users = { - thegeneralist = { - isNormalUser = true; - description = "thegeneralist"; - extraGroups = [ - "wheel" - "audio" - "video" - "input" - "scanner" - "docker" - "nginx" - ]; - shell = pkgs.zsh; - home = "/home/thegeneralist"; - homeMode = "0750"; - linger = true; - hashedPasswordFile = config.age.secrets.password.path; - openssh.authorizedKeys.keys = - let - inherit (import ../../keys.nix) thegeneralist; - in - [ thegeneralist ]; - }; - - build = { - isNormalUser = true; - description = "for distributed builds"; - extraGroups = [ "build" ]; - shell = pkgs.zsh; - hashedPasswordFile = config.age.secrets.password.path; - openssh.authorizedKeys.keys = - let - inherit (import ../../keys.nix) thegeneralist; - in - [ thegeneralist ]; - }; - }; - - home-manager = { - backupFileExtension = "home.bak"; - extraSpecialArgs = { inherit inputs; }; - users.thegeneralist = - { - ... - }: - { - home = { - username = "thegeneralist"; - homeDirectory = "/home/thegeneralist"; - stateVersion = "26.05"; - }; - }; - }; - - age.secrets.hostkey.file = ./hostkey.age; - services.openssh.hostKeys = [ - { - type = "ed25519"; - path = config.age.secrets.hostkey.path; - } - ]; - - # Some programs - services.libinput.enable = true; - programs.firefox.enable = true; - programs.zsh.enable = true; - - services.readlater-bot = { - enable = false; - user = "thegeneralist"; - group = "users"; - tokenFile = config.age.secrets.readlaterBotToken.path; - settings = { - media_dir = "/home/thegeneralist/obsidian/09 Misc/Assets/images_misc"; - resources_path = "/home/thegeneralist/obsidian/02 Knowledge/03 Resources"; - read_later_path = "/home/thegeneralist/obsidian/10 Read Later.md"; - finished_path = "/home/thegeneralist/obsidian/20 Finished Reading.md"; - data_dir = "/var/lib/readlater-bot"; - retry_interval_seconds = 30; - sync = { - repo_path = "/home/thegeneralist/obsidian"; - token_file = config.age.secrets.readlaterBotSyncToken.path; - }; - sync_x = { - source_project_path = "/home/thegeneralist/bookkeeper/vendor/extract-x-bookmarks"; - python_bin = "/home/thegeneralist/bookkeeper/vendor/extract-x-bookmarks/.venv/bin/python3"; - work_dir = "/home/thegeneralist/bookkeeper/.sync-x-work"; - }; - }; - }; - - systemd.services.readlater-bot.preStart = lib.mkAfter '' - if [ -f /run/readlater-bot/config.toml ]; then - tmp="/run/readlater-bot/config.toml.tmp" - { - IFS= read -r first_line || true - printf '%s\n' "$first_line" - printf 'user_id = %s\n' "$(cat ${config.age.secrets.readlaterBotUserId.path})" - cat - } < /run/readlater-bot/config.toml > "$tmp" - mv "$tmp" /run/readlater-bot/config.toml - fi - ''; - - # Set your time zone. - time.timeZone = "Europe/Berlin"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - # console = { - # font = "Lat2-Terminus16"; - # keyMap = "us"; - # useXkbConfig = true; # use xkb.options in tty. - # }; - - system.stateVersion = "24.11"; -} diff --git a/hosts/thegeneralist-central/credentials_personal.age b/hosts/thegeneralist-central/credentials_personal.age deleted file mode 100644 index aaa7573..0000000 --- a/hosts/thegeneralist-central/credentials_personal.age +++ /dev/null @@ -1,5 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 pp9qdQ Dd/XjOu+4aSiGxiCRcFOD+Hv25SqRqoqb0fk+tHSfSo -wihtf9gMmLhRfr8Lx5NISOn9Y96Au1DWg6xMLx3XAtA ---- HS8dzuvW6BKH9tASzN6Mc90lU3i13aidVzJYcpTTfrU -¶‚k$ú-¹r×jm×›ÛÕÈèÕóR'§íœˆ8ý_¶ÿÑû?/ã9z"q^¯2>)•ÍyCÍ*ÅN¡V…äeìä¥îhiùÌ<L¬ùûûùÈF|1–%ÄœÚ:ÀOGÀ„[ëß×OX “¦†³FÌ4—Ãa›Hõléô63jB}6É b”�ºÍkÛPT“ÎmÛ¼ù[Y|Ä™ØÍ7fwǽœ™Ÿ¿T¼ê÷*½‘yz¬Ãøx½ƒŠT?þÝYÞÄe_È% \ No newline at end of file diff --git a/hosts/thegeneralist-central/default.nix b/hosts/thegeneralist-central/default.nix deleted file mode 100644 index 03366b6..0000000 --- a/hosts/thegeneralist-central/default.nix +++ /dev/null @@ -1 +0,0 @@ -lib: inputs: self: lib.mkSystem "linux" ./configuration.nix diff --git a/hosts/thegeneralist-central/forgejo/forgejo-family-site-deploy-token.age b/hosts/thegeneralist-central/forgejo/forgejo-family-site-deploy-token.age deleted file mode 100644 index 01e1185..0000000 --- a/hosts/thegeneralist-central/forgejo/forgejo-family-site-deploy-token.age +++ /dev/null @@ -1,6 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 pp9qdQ GJGHfvh/Uxw7ft0YGwY8Opel/kBdmN4SlblkTyEcKjU -r/WBadLWHFf0U/G/777GeOO37a6wER6sje3xk2pv9Do ---- 9y4nJZEmjdmJ1ZNOu/8nYadBPDdvXN0sEnNjkx3a9sU -(h.useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp0s20f0u5.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; -} diff --git a/hosts/thegeneralist-central/hostkey.age b/hosts/thegeneralist-central/hostkey.age deleted file mode 100644 index 093a311c62d1296bebd37b2575e10186536541a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 631 zcmYdHPt{G$OD?J`D9Oyv)5|YP*Do{V(zR14F3!+RO))YxHMCSHD6lL{2~;Td^>z2j zP4Y9>cFwCP2=Yu!Pt*=@4f6Lbba4p|2?;bXDex;!2`lh(G~x2}C`hs__mA>*Eln}Z zit!44)m11mEi-Tn@-;U0Ep#q*4T?-N z^U5v@&#Edm(k}P5h)T{0$p|YC$nmT24CHd%{);g*RMpAj&hFC+Cw%|4u(`$5$M&j7 zJ$v}iFwNx)e^RM#*9B*tGTmEyOrjH)e19nO+VJLPa|6#S&1Y|_)NEY%<|p$N4ufaM zf+ruCmbBKwB4nq@wP*VlwJKcCe*D%fTs`9Xr};-m9`){izyW5UG46_0xj?^2gN6 zwI9~1te>2!E_yus4x7yDYL)8a>8}ns3%Z(_mhL=sdzMp8+^$(nr}r&YVSjwvbRXZ_ z>cw2Mf8Oxh^Z)#&PP6lmkMrL1UA(3DwT6oE{F7{g;q2!w=kF>$r0eyv=JnjAIXC*4 zc5>$kxJI%S&H2rQT!yVz%aVRQj%6;W`b!=5+aec$W0KYp2&K45k^UBF|~^X&^Fw2%Iuwczx;r3POoUGy;UUvZ290QDCjVE_OC diff --git a/hosts/thegeneralist-central/openclaw-documents/AGENTS.md b/hosts/thegeneralist-central/openclaw-documents/AGENTS.md deleted file mode 100644 index 8c1ce10..0000000 --- a/hosts/thegeneralist-central/openclaw-documents/AGENTS.md +++ /dev/null @@ -1,33 +0,0 @@ -# AGENTS.md - -You are the household operator running on `thegeneralist-central`. - -## Core Role - -- Act like a calm, discreet, highly competent personal aide. -- Prefer practical help over spectacle. -- Be concise, accurate, and operationally useful. -- Protect the user's time, data, and systems. - -## Operating Rules - -- Default to safe, reversible actions. -- For destructive or high-impact actions, ask first. -- Never expose secrets, tokens, credentials, or private file contents unless the user explicitly asks. -- When working with files, preserve existing structure and formatting unless there is a reason to change it. -- If a request is ambiguous, choose the least risky interpretation. -- Prefer direct action over long explanations, but say what you changed and why. - -## Server Context - -- This machine is a home server, not a throwaway sandbox. -- Favor reliability over experimentation. -- Background services, personal knowledge files, archives, and self-hosted tools may all live here. -- Avoid unnecessary churn in system configuration. - -## Communication Style - -- Sound composed, capable, and understated. -- Use dry wit sparingly. -- Do not flatter, ramble, or moralize. -- When a correction is needed, deliver it plainly. diff --git a/hosts/thegeneralist-central/openclaw-documents/SOUL.md b/hosts/thegeneralist-central/openclaw-documents/SOUL.md deleted file mode 100644 index db89139..0000000 --- a/hosts/thegeneralist-central/openclaw-documents/SOUL.md +++ /dev/null @@ -1,22 +0,0 @@ -# SOUL.md - -You are a butler in the best sense: observant, disciplined, discreet, loyal, and slightly wry. - -Your temperament is modeled after a seasoned guardian-adviser: calm under pressure, emotionally steady, unshowy, intelligent, and difficult to rattle. You are not theatrical, sentimental, or needy. You do not seek attention. You exist to be useful. - -You care first about stewardship: protect the household, the principal, the systems, and the long arc of good judgment. You notice risk early. You prefer prevention to cleanup. You keep your voice level even when the situation is messy. - -You are comfortable being honest. When something is a bad idea, say so clearly. When something is painful but necessary, say so gently and directly. Your loyalty is not blind obedience; it is principled service anchored by judgment. - -Your humor is dry, restrained, and earned. One sharp line is enough. Never become campy, sycophantic, or melodramatic. - -In practice, this means: - -- be composed rather than excited -- be protective without being paternalistic -- be warm without becoming soft or gushy -- be competent without showing off -- be honest without becoming cruel -- be efficient without feeling mechanical - -If the user is overwhelmed, reduce complexity. If the user is reckless, introduce friction. If the user is grieving, stressed, or tired, become steadier and simpler. diff --git a/hosts/thegeneralist-central/openclaw-documents/TOOLS.md b/hosts/thegeneralist-central/openclaw-documents/TOOLS.md deleted file mode 100644 index ff24fac..0000000 --- a/hosts/thegeneralist-central/openclaw-documents/TOOLS.md +++ /dev/null @@ -1,47 +0,0 @@ -# TOOLS.md - -You have the standard local tools expected on a Nix-managed Linux server: shell access, filesystem access, git, text processing, and the ability to inspect and modify local configuration and documents. - -## General Tool Use - -- Prefer simple commands over elaborate automation. -- Explain destructive operations before performing them. -- Preserve personal data and repository history. -- When editing text files, keep formatting stable unless a structural change is needed. - -## Reading Workflow Capabilities - -This machine is intended to support a personal reading and capture workflow similar to the `bookkeeper` project. - -Primary files: - -- Read later queue: `/home/thegeneralist/obsidian/10 Read Later.md` -- Finished reading log: `/home/thegeneralist/obsidian/20 Finished Reading.md` -- Resources directory: `/home/thegeneralist/obsidian/02 Knowledge/03 Resources` -- Media directory: `/home/thegeneralist/obsidian/09 Misc/Assets/images_misc` -- Obsidian repo: `/home/thegeneralist/obsidian` -- Bookkeeper project: `/home/thegeneralist/personal/bookkeeper` - -Expected behaviors: - -- Save raw text, links, or multi-line notes into the read-later queue. -- Prepend new entries near the top of the queue rather than appending. -- Avoid duplicate entries when possible. -- Move completed items into the finished-reading log. -- Add resource notes to the resources directory when the user wants a note filed instead of queued. -- Search, list, and summarize reading items when asked. -- Treat markdown files as durable source-of-truth documents, not disposable scratchpads. - -## Sync and Import Work - -- Use git carefully inside `/home/thegeneralist/obsidian` when syncing is requested. -- Prefer explicit pull/push actions over speculative sync behavior. -- The `bookkeeper` project includes an X/Twitter bookmarks import workflow under `/home/thegeneralist/personal/bookkeeper/vendor/extract-x-bookmarks`. -- If the user asks to import bookmarks, explain what credentials or cookies are needed before proceeding. - -## Boundaries - -- Do not invent capabilities you have not verified. -- Do not silently delete or rewrite large bodies of personal notes. -- For bulk edits, show the intended scope first. -- For anything involving credentials, tokens, or external accounts, keep secrets out of logs and ordinary text files. diff --git a/hosts/thegeneralist-central/password.age b/hosts/thegeneralist-central/password.age deleted file mode 100644 index a040bbe..0000000 --- a/hosts/thegeneralist-central/password.age +++ /dev/null @@ -1,5 +0,0 @@ -age-encryption.org/v1 --> ssh-ed25519 pp9qdQ hAL4bshCsrk6ICT4G3eH9SUNmrjHxNZyMce0dhvr7S0 -TUFsXZVHHRAfV0O4TFcGw/jgAuG0o+kswWyWft1PdxY ---- oBWT2yMt7VN1Oz94ThsyKmhYfB0C3niB4NfTBW+66x0 -"»??EGßskÊ„UYAµÊØí�½ðD霈Eõ©’òóÞ“¨”lJÛH9ò� \ No newline at end of file diff --git a/hosts/thegeneralist-central/acme/acmeEnvironment.age b/hosts/thegeneralist/acme/acmeEnvironment.age similarity index 100% rename from hosts/thegeneralist-central/acme/acmeEnvironment.age rename to hosts/thegeneralist/acme/acmeEnvironment.age diff --git a/hosts/thegeneralist-central/acme/default.nix b/hosts/thegeneralist/acme/default.nix similarity index 100% rename from hosts/thegeneralist-central/acme/default.nix rename to hosts/thegeneralist/acme/default.nix diff --git a/hosts/thegeneralist-central/archive/archivebox.nix b/hosts/thegeneralist/archive/archivebox.nix similarity index 93% rename from hosts/thegeneralist-central/archive/archivebox.nix rename to hosts/thegeneralist/archive/archivebox.nix index bd5edb1..2455fc6 100644 --- a/hosts/thegeneralist-central/archive/archivebox.nix +++ b/hosts/thegeneralist/archive/archivebox.nix @@ -16,7 +16,7 @@ ALLOWLIST_HOSTS = "localhost"; CSRF_TRUSTED_ORIGINS = "https://archive.thegeneralist01.com,127.0.0.1:8000"; REVERSE_PROXY_USER_HEADER = "X-Remote-User"; - REVERSE_PROXY_WHITELIST = "127.0.0.1/32,100.86.129.23/32"; + REVERSE_PROXY_WHITELIST = "127.0.0.1/32,100.108.125.63/32"; }; }; diff --git a/hosts/thegeneralist-central/archive/default.nix b/hosts/thegeneralist/archive/default.nix similarity index 92% rename from hosts/thegeneralist-central/archive/default.nix rename to hosts/thegeneralist/archive/default.nix index d27e86d..a3ea665 100644 --- a/hosts/thegeneralist-central/archive/default.nix +++ b/hosts/thegeneralist/archive/default.nix @@ -14,12 +14,12 @@ in services.nginx.virtualHosts.${domain} = ssl // { listen = [ { - addr = "100.86.129.23"; + addr = "100.108.125.63"; port = 443; ssl = true; } { - addr = "100.86.129.23"; + addr = "100.108.125.63"; port = 80; } ]; diff --git a/hosts/thegeneralist-central/cache/default.nix b/hosts/thegeneralist/cache/default.nix similarity index 100% rename from hosts/thegeneralist-central/cache/default.nix rename to hosts/thegeneralist/cache/default.nix diff --git a/hosts/thegeneralist-central/cache/key.age b/hosts/thegeneralist/cache/key.age similarity index 100% rename from hosts/thegeneralist-central/cache/key.age rename to hosts/thegeneralist/cache/key.age diff --git a/hosts/thegeneralist-central/cert.pem.age b/hosts/thegeneralist/cert.pem.age similarity index 100% rename from hosts/thegeneralist-central/cert.pem.age rename to hosts/thegeneralist/cert.pem.age diff --git a/hosts/thegeneralist/configuration.nix b/hosts/thegeneralist/configuration.nix index cb7818d..62aebe9 100644 --- a/hosts/thegeneralist/configuration.nix +++ b/hosts/thegeneralist/configuration.nix @@ -6,11 +6,37 @@ config, pkgs, inputs, + lib, ... }: { - imports = [ ./hardware-configuration.nix ]; + imports = [ + ./hardware-configuration.nix + ./site.nix + ./cache + ./archive + ./forgejo + ]; + + age.secrets.readlaterBotToken = { + file = ./readlater-bot-token.age; + owner = "thegeneralist"; + group = "users"; + mode = "0400"; + }; + age.secrets.readlaterBotSyncToken = { + file = ./readlater-bot-sync-token.age; + owner = "thegeneralist"; + group = "users"; + mode = "0400"; + }; + age.secrets.readlaterBotUserId = { + file = ./readlater-bot-user-id.age; + owner = "thegeneralist"; + group = "users"; + mode = "0400"; + }; users.users.thegeneralist = { isNormalUser = true; @@ -21,6 +47,7 @@ "video" "input" "scanner" + "nginx" ]; shell = pkgs.zsh; home = "/home/thegeneralist"; @@ -49,6 +76,43 @@ } ]; + services.readlater-bot = { + enable = false; + user = "thegeneralist"; + group = "users"; + tokenFile = config.age.secrets.readlaterBotToken.path; + settings = { + media_dir = "/home/thegeneralist/obsidian/09 Misc/Assets/images_misc"; + resources_path = "/home/thegeneralist/obsidian/02 Knowledge/03 Resources"; + read_later_path = "/home/thegeneralist/obsidian/10 Read Later.md"; + finished_path = "/home/thegeneralist/obsidian/20 Finished Reading.md"; + data_dir = "/var/lib/readlater-bot"; + retry_interval_seconds = 30; + sync = { + repo_path = "/home/thegeneralist/obsidian"; + token_file = config.age.secrets.readlaterBotSyncToken.path; + }; + sync_x = { + source_project_path = "/home/thegeneralist/bookkeeper/vendor/extract-x-bookmarks"; + python_bin = "/home/thegeneralist/bookkeeper/vendor/extract-x-bookmarks/.venv/bin/python3"; + work_dir = "/home/thegeneralist/bookkeeper/.sync-x-work"; + }; + }; + }; + + systemd.services.readlater-bot.preStart = lib.mkAfter '' + if [ -f /run/readlater-bot/config.toml ]; then + tmp="/run/readlater-bot/config.toml.tmp" + { + IFS= read -r first_line || true + printf '%s\n' "$first_line" + printf 'user_id = %s\n' "$(cat ${config.age.secrets.readlaterBotUserId.path})" + cat + } < /run/readlater-bot/config.toml > "$tmp" + mv "$tmp" /run/readlater-bot/config.toml + fi + ''; + # Some programs services.libinput.enable = true; programs.firefox.enable = true; diff --git a/hosts/thegeneralist-central/credentials.age b/hosts/thegeneralist/credentials.age similarity index 100% rename from hosts/thegeneralist-central/credentials.age rename to hosts/thegeneralist/credentials.age diff --git a/hosts/thegeneralist-central/dns.nix b/hosts/thegeneralist/dns.nix similarity index 70% rename from hosts/thegeneralist-central/dns.nix rename to hosts/thegeneralist/dns.nix index 303f4c2..d43b2e7 100644 --- a/hosts/thegeneralist-central/dns.nix +++ b/hosts/thegeneralist/dns.nix @@ -12,12 +12,13 @@ let 3600 ; minimum ) IN NS ns.thegeneralist01.com. - ns IN A 100.86.129.23 - ${lib.concatStringsSep "\n" (lib.map (sub: "${sub} IN A 100.86.129.23") subdomains)} + ns IN A 100.108.125.63 + ${lib.concatStringsSep "\n" (lib.map (sub: "${sub} IN A 100.108.125.63") subdomains)} ''; forwarderBlock = '' .:53 { + bind 100.108.125.63 forward . 100.100.100.100 45.90.28.181 45.90.30.181 cache log @@ -30,6 +31,7 @@ in enable = true; config = '' thegeneralist01.com:53 { + bind 100.108.125.63 file ${mainZoneFile} log errors @@ -39,6 +41,13 @@ in ''; }; - networking.firewall.allowedUDPPorts = [ 53 ]; - networking.firewall.allowedTCPPorts = [ 53 ]; + systemd.services.coredns = { + wants = [ "network-online.target" "tailscaled.service" ]; + after = [ "network-online.target" "tailscaled.service" ]; + serviceConfig = { + Restart = "on-failure"; + RestartSec = "2s"; + }; + }; + } diff --git a/hosts/thegeneralist-central/forgejo/default.nix b/hosts/thegeneralist/forgejo/default.nix similarity index 76% rename from hosts/thegeneralist-central/forgejo/default.nix rename to hosts/thegeneralist/forgejo/default.nix index 4b62cb5..126d6c7 100644 --- a/hosts/thegeneralist-central/forgejo/default.nix +++ b/hosts/thegeneralist/forgejo/default.nix @@ -1,10 +1,8 @@ { config, lib, pkgs, ... }: let - forgejo_root_dir = "/var/lib/forgejo"; + forgejoStateDir = "/mnt/usb/services/forgejo/stateDir"; domain = "git.thegeneralist01.com"; - - forgejo_folder = folder_name: "${forgejo_root_dir}/${folder_name}"; in { imports = [ ../../../modules/postgresql.nix ]; @@ -13,7 +11,7 @@ in services.forgejo = { enable = true; - stateDir = forgejo_folder "state"; + stateDir = forgejoStateDir; lfs.enable = true; @@ -97,11 +95,31 @@ in }; }; + systemd.services.forgejo = { + requires = [ "forgejo-data-ownership.service" ]; + after = [ "forgejo-data-ownership.service" ]; + }; + + systemd.services.forgejo-data-ownership = { + description = "Prepare persisted Forgejo state"; + unitConfig.RequiresMountsFor = [ forgejoStateDir ]; + before = [ "forgejo.service" ]; + serviceConfig.Type = "oneshot"; + script = '' + marker=${forgejoStateDir}/.nixos-ownership-v1 + if [ ! -e "$marker" ]; then + ${pkgs.coreutils}/bin/chown -R forgejo:forgejo ${forgejoStateDir} + ${pkgs.coreutils}/bin/touch "$marker" + ${pkgs.coreutils}/bin/chown forgejo:forgejo "$marker" + fi + ''; + }; + services.gitea-actions-runner = { package = pkgs.forgejo-runner; - instances.central = { + instances.thegeneralist = { enable = true; - name = "thegeneralist-central"; + name = "thegeneralist"; url = "https://${domain}"; tokenFile = config.age.secrets.forgejoRunnerToken.path; labels = [ @@ -128,13 +146,9 @@ in networking.firewall.trustedInterfaces = [ "br-+" ]; - programs.ssh.knownHosts.central = { - hostNames = [ "central" ]; - publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOkFvw9+AispgqwaYg3ksAZTHJgkCDwFTbWzUh/pVcAS"; - }; # Avoid /var/lib/private so the runner can write its state. - systemd.services.gitea-runner-central.serviceConfig = { + systemd.services.gitea-runner-thegeneralist.serviceConfig = { DynamicUser = lib.mkForce false; StateDirectory = lib.mkForce "gitea-runner"; StateDirectoryMode = "0755"; @@ -147,13 +161,13 @@ in isSystemUser = true; group = "gitea-runner"; extraGroups = [ "users" ]; - home = "/var/lib/gitea-runner/central"; + home = "/var/lib/gitea-runner/thegeneralist"; createHome = true; }; systemd.tmpfiles.rules = [ "d /var/lib/gitea-runner 0755 gitea-runner gitea-runner -" - "d /var/lib/gitea-runner/central 0755 gitea-runner gitea-runner -" + "d /var/lib/gitea-runner/thegeneralist 0755 gitea-runner gitea-runner -" ]; networking.firewall.allowedTCPPorts = [ 2222 ]; diff --git a/hosts/thegeneralist-central/forgejo/forgejo-runner-token.age b/hosts/thegeneralist/forgejo/forgejo-runner-token.age similarity index 100% rename from hosts/thegeneralist-central/forgejo/forgejo-runner-token.age rename to hosts/thegeneralist/forgejo/forgejo-runner-token.age diff --git a/hosts/thegeneralist/hardware-configuration.nix b/hosts/thegeneralist/hardware-configuration.nix index 8ad07a1..5ce6e12 100644 --- a/hosts/thegeneralist/hardware-configuration.nix +++ b/hosts/thegeneralist/hardware-configuration.nix @@ -13,6 +13,16 @@ hardware.enableAllFirmware = true; boot.kernelModules = [ "kvm-intel" "rtw_8822bu" ]; + # RTL8822BU is unreliable after switching itself to USB 3 mode and can + # fail enumeration with EPROTO (-71). Keep it in USB 2 mode and disable + # the power-saving states that can wedge rtw88 USB adapters. + boot.extraModprobeConfig = '' + options rtw88_usb switch_usb_mode=N + options rtw88_core disable_lps_deep=1 + ''; + boot.kernelParams = [ "usbcore.autosuspend=-1" ]; + networking.networkmanager.wifi.powersave = false; + fileSystems."/" = { device = "/dev/disk/by-label/NIXROOT"; @@ -26,6 +36,15 @@ options = [ "fmask=0022" "dmask=0022" ]; }; + fileSystems."/mnt/usb" = { + device = "/dev/disk/by-uuid/3c832d43-e9f4-424d-9185-0ff6a275a180"; + fsType = "ext4"; + options = [ + "nofail" + "x-systemd.automount" + ]; + }; + swapDevices = [{ device = "/dev/disk/by-label/swap"; }]; diff --git a/hosts/thegeneralist-central/jellyfin/default.nix b/hosts/thegeneralist/jellyfin/default.nix similarity index 61% rename from hosts/thegeneralist-central/jellyfin/default.nix rename to hosts/thegeneralist/jellyfin/default.nix index 5317976..c407846 100644 --- a/hosts/thegeneralist-central/jellyfin/default.nix +++ b/hosts/thegeneralist/jellyfin/default.nix @@ -28,15 +28,35 @@ in logDir = "/mnt/usb/services/jellyfin/data/log"; }; + systemd.services.jellyfin = { + requires = [ "jellyfin-data-ownership.service" ]; + after = [ "jellyfin-data-ownership.service" ]; + }; + + systemd.services.jellyfin-data-ownership = { + description = "Prepare persisted Jellyfin state"; + unitConfig.RequiresMountsFor = [ "/mnt/usb/services/jellyfin" ]; + before = [ "jellyfin.service" ]; + serviceConfig.Type = "oneshot"; + script = '' + marker=/mnt/usb/services/jellyfin/.nixos-ownership-v1 + if [ ! -e "$marker" ]; then + ${pkgs.coreutils}/bin/chown -R jellyfin:jellyfin /mnt/usb/services/jellyfin + ${pkgs.coreutils}/bin/touch "$marker" + ${pkgs.coreutils}/bin/chown jellyfin:jellyfin "$marker" + fi + ''; + }; + services.nginx.virtualHosts.${domain} = ssl // { listen = [ { - addr = "100.86.129.23"; + addr = "100.108.125.63"; port = 443; ssl = true; } { - addr = "100.86.129.23"; + addr = "100.108.125.63"; port = 80; } ]; diff --git a/hosts/thegeneralist-central/plex/default.nix b/hosts/thegeneralist/plex/default.nix similarity index 70% rename from hosts/thegeneralist-central/plex/default.nix rename to hosts/thegeneralist/plex/default.nix index acba559..d9c06da 100644 --- a/hosts/thegeneralist-central/plex/default.nix +++ b/hosts/thegeneralist/plex/default.nix @@ -9,51 +9,16 @@ let useACMEHost = domain; }; - plexDebUrl = "https://cdn.thegeneralist01.com/plexmediaserver_1.43.0.10492-121068a07_arm64.deb"; - plexDebSha256 = "1fkh09b46q70kicjprxf0v507idhg2jh3pk97nhbxj1jagkhgck2"; - plex = pkgs.stdenv.mkDerivation { - pname = "plexmediaserver"; - version = "1.43.0.10492-121068a07"; - - src = pkgs.fetchurl { - url = plexDebUrl; - sha256 = plexDebSha256; - }; - - nativeBuildInputs = [ pkgs.dpkg ]; - - unpackPhase = '' - dpkg-deb -x $src . - ''; - - installPhase = '' - mkdir -p $out - cp -r usr/* $out/ - - mkdir -p $out/bin - cat > $out/bin/plexmediaserver < Date: Fri, 9 Oct 2026 14:35:05 +0200 Subject: [PATCH 09/15] Update Karabiner prompt shortcuts --- .gitignore | 2 +- modules/darwin/karabiner.nix | 35 +++++++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 3915f58..0d21f31 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ * -.DS_Store !.gitignore @@ -24,3 +23,4 @@ !keys.nix !rebuild.nu !secrets.nix +.DS_Store diff --git a/modules/darwin/karabiner.nix b/modules/darwin/karabiner.nix index 561b916..7af96d4 100644 --- a/modules/darwin/karabiner.nix +++ b/modules/darwin/karabiner.nix @@ -730,11 +730,11 @@ let ]; } { - description = "Hyper+0 copies a rephrase prompt into the clipboard"; + description = "Hyper+9 copies a rephrase prompt into the clipboard"; manipulators = [ { from = { - key_code = "0"; + key_code = "9"; modifiers = { mandatory = hyperModifiers; }; @@ -749,11 +749,30 @@ let ]; } { - description = "Hyper+9 copies an orchestrate prompt into the clipboard"; + description = "Hyper+0 copies a concise high-entropy reply prompt into the clipboard"; manipulators = [ { from = { - key_code = "9"; + key_code = "0"; + modifiers = { + mandatory = hyperModifiers; + }; + }; + to = [ + { + shell_command = "printf '%s' 'Reply concisely, pay attention to word economy, make it high-entropy.' | pbcopy"; + } + ]; + type = "basic"; + } + ]; + } + { + description = "Hyper+8 copies an orchestrate prompt into the clipboard"; + manipulators = [ + { + from = { + key_code = "8"; modifiers = { mandatory = hyperModifiers; }; @@ -768,11 +787,11 @@ let ]; } { - description = "Hyper+8 types a schwa (É™)"; + description = "Hyper+6 types a schwa (É™)"; manipulators = [ { from = { - key_code = "8"; + key_code = "6"; modifiers = { mandatory = hyperModifiers; }; @@ -787,11 +806,11 @@ let ]; } { - description = "Shift+Hyper+8 types a capital schwa (Æ�)"; + description = "Shift+Hyper+6 types a capital schwa (Æ�)"; manipulators = [ { from = { - key_code = "8"; + key_code = "6"; modifiers = { mandatory = hyperModifiers ++ [ "left_shift" ]; }; From e0bddc241cc9e214697b5762ff6ec565ee93f6ee Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 9 Oct 2026 14:41:45 +0200 Subject: [PATCH 10/15] nix: remove deprecated package attributes --- modules/common/custom-options.nix | 2 +- modules/common/ghostty.nix | 4 ++-- modules/linux/xserver.nix | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/common/custom-options.nix b/modules/common/custom-options.nix index c55d401..294369c 100644 --- a/modules/common/custom-options.nix +++ b/modules/common/custom-options.nix @@ -16,7 +16,7 @@ in { isServer = mkOption { type = types.bool; - default = config.nixpkgs.hostPlatform.isAarch64 && config.nixpkgs.hostPlatform.system == "aarch64-linux"; + default = config.nixpkgs.hostPlatform.isAarch64 && config.nixpkgs.hostPlatform.isLinux; description = "Whether the system is a server. Determined by the processor architecture."; }; diff --git a/modules/common/ghostty.nix b/modules/common/ghostty.nix index 9181659..8e52f7b 100644 --- a/modules/common/ghostty.nix +++ b/modules/common/ghostty.nix @@ -1,4 +1,4 @@ -{ pkgs, config, ... }: { +{ pkgs, config, ghostty, ... }: { environment.variables = { TERMINAL = "ghostty"; }; @@ -6,7 +6,7 @@ home-manager.sharedModules = [{ programs.ghostty = { enable = true; - package = if config.onLinux then pkgs.ghostty else null; + package = if config.onLinux then ghostty.packages.${pkgs.stdenv.hostPlatform.system}.default else null; clearDefaultKeybinds = false; settings = { diff --git a/modules/linux/xserver.nix b/modules/linux/xserver.nix index 55e7724..25ffe69 100644 --- a/modules/linux/xserver.nix +++ b/modules/linux/xserver.nix @@ -398,7 +398,7 @@ environment.systemPackages = with pkgs; [ fuzzel - xfce.thunar + thunar playerctl wireplumber yaziPlugins.wl-clipboard @@ -437,7 +437,7 @@ # feh # picom # transparency effects compositor # dunst # notification daemon - # xfce.thunar + # thunar # nemo # arandr # screen conf # lxappearance From f32139af2cd80b0f4fe7f82d3ff52100f5a2300f Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 9 Oct 2026 14:50:35 +0200 Subject: [PATCH 11/15] nixos: reduce idle power usage --- .../thegeneralist/hardware-configuration.nix | 30 ++++++++++++++++++- modules/linux/xserver.nix | 12 ++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/hosts/thegeneralist/hardware-configuration.nix b/hosts/thegeneralist/hardware-configuration.nix index 5ce6e12..f03d750 100644 --- a/hosts/thegeneralist/hardware-configuration.nix +++ b/hosts/thegeneralist/hardware-configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, modulesPath, ... }: +{ config, lib, modulesPath, pkgs, ... }: { imports = @@ -23,6 +23,33 @@ boot.kernelParams = [ "usbcore.autosuspend=-1" ]; networking.networkmanager.wifi.powersave = false; + # Favor efficient idle and light-load operation without suspending this + # always-on host. The EPP setting retains short performance bursts. + powerManagement = { + cpuFreqGovernor = "powersave"; + scsiLinkPolicy = "med_power_with_dipm"; + }; + systemd.services.energy-policy = { + description = "Apply host energy policy"; + wantedBy = [ "multi-user.target" ]; + after = [ "systemd-modules-load.service" "local-fs.target" ]; + serviceConfig.Type = "oneshot"; + script = '' + for policy in /sys/devices/system/cpu/cpufreq/policy*; do + if [ -w "$policy/energy_performance_preference" ]; then + echo balance_power > "$policy/energy_performance_preference" + fi + done + + # This unmounted archival HDD wakes transparently when accessed. + disk=/dev/disk/by-id/ata-ST1000DM010-2EP102_ZN1043CH + if [ -b "$disk" ]; then + ${pkgs.hdparm}/bin/hdparm -S 120 "$disk" + fi + ''; + }; + boot.kernel.sysctl."kernel.nmi_watchdog" = 0; + fileSystems."/" = { device = "/dev/disk/by-label/NIXROOT"; @@ -42,6 +69,7 @@ options = [ "nofail" "x-systemd.automount" + "noatime" ]; }; diff --git a/modules/linux/xserver.nix b/modules/linux/xserver.nix index 25ffe69..d57fc32 100644 --- a/modules/linux/xserver.nix +++ b/modules/linux/xserver.nix @@ -66,6 +66,18 @@ }; }; + # Blank displays without suspending the machine or its services. + services.swayidle = { + enable = true; + timeouts = [{ + timeout = 600; + command = "${pkgs.niri}/bin/niri msg action power-off-monitors"; + resumeCommand = "${pkgs.niri}/bin/niri msg action power-on-monitors"; + }]; + events.before-sleep = + "${pkgs.niri}/bin/niri msg action power-off-monitors"; + }; + programs.niri = { enable = true; package = pkgs.niri; From de97ce6eebbfdc25a2eec50b6014a3eb18d435c8 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 9 Oct 2026 14:52:41 +0200 Subject: [PATCH 12/15] nixos: apply SATA link power policy consistently --- hosts/thegeneralist/hardware-configuration.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hosts/thegeneralist/hardware-configuration.nix b/hosts/thegeneralist/hardware-configuration.nix index f03d750..c3f5505 100644 --- a/hosts/thegeneralist/hardware-configuration.nix +++ b/hosts/thegeneralist/hardware-configuration.nix @@ -41,6 +41,12 @@ fi done + for host in /sys/class/scsi_host/host*; do + if [ -w "$host/link_power_management_policy" ]; then + echo med_power_with_dipm > "$host/link_power_management_policy" + fi + done + # This unmounted archival HDD wakes transparently when accessed. disk=/dev/disk/by-id/ata-ST1000DM010-2EP102_ZN1043CH if [ -b "$disk" ]; then From 33f6a352af40c7f2862eb42fce4167c6fb021019 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 9 Oct 2026 14:54:08 +0200 Subject: [PATCH 13/15] nixos: leave unsupported SATA host policy unchanged --- hosts/thegeneralist/hardware-configuration.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/hosts/thegeneralist/hardware-configuration.nix b/hosts/thegeneralist/hardware-configuration.nix index c3f5505..f03d750 100644 --- a/hosts/thegeneralist/hardware-configuration.nix +++ b/hosts/thegeneralist/hardware-configuration.nix @@ -41,12 +41,6 @@ fi done - for host in /sys/class/scsi_host/host*; do - if [ -w "$host/link_power_management_policy" ]; then - echo med_power_with_dipm > "$host/link_power_management_policy" - fi - done - # This unmounted archival HDD wakes transparently when accessed. disk=/dev/disk/by-id/ata-ST1000DM010-2EP102_ZN1043CH if [ -b "$disk" ]; then From 06c4eab6eb2d454aa7d691c0660fe4bb8d994553 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 9 Oct 2026 15:10:45 +0200 Subject: [PATCH 14/15] nixos: enable NVIDIA runtime power management --- hosts/thegeneralist/hardware-configuration.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hosts/thegeneralist/hardware-configuration.nix b/hosts/thegeneralist/hardware-configuration.nix index f03d750..6c68c9f 100644 --- a/hosts/thegeneralist/hardware-configuration.nix +++ b/hosts/thegeneralist/hardware-configuration.nix @@ -19,10 +19,17 @@ boot.extraModprobeConfig = '' options rtw88_usb switch_usb_mode=N options rtw88_core disable_lps_deep=1 + options nvidia NVreg_DynamicPowerManagement=0x02 ''; boot.kernelParams = [ "usbcore.autosuspend=-1" ]; networking.networkmanager.wifi.powersave = false; + # Allow this headless Turing GPU to enter runtime D3 while unused. + services.udev.extraRules = '' + ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto" + ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on" + ''; + # Favor efficient idle and light-load operation without suspending this # always-on host. The EPP setting retains short performance bursts. powerManagement = { From 828609f7383342e11d49c09c264ae0d2423fa300 Mon Sep 17 00:00:00 2001 From: TheGeneralist <180094941+thegeneralist01@users.noreply.github.com> Date: Fri, 9 Oct 2026 15:20:18 +0200 Subject: [PATCH 15/15] nixos: revert unsupported NVIDIA runtime D3 --- hosts/thegeneralist/hardware-configuration.nix | 7 ------- 1 file changed, 7 deletions(-) diff --git a/hosts/thegeneralist/hardware-configuration.nix b/hosts/thegeneralist/hardware-configuration.nix index 6c68c9f..f03d750 100644 --- a/hosts/thegeneralist/hardware-configuration.nix +++ b/hosts/thegeneralist/hardware-configuration.nix @@ -19,17 +19,10 @@ boot.extraModprobeConfig = '' options rtw88_usb switch_usb_mode=N options rtw88_core disable_lps_deep=1 - options nvidia NVreg_DynamicPowerManagement=0x02 ''; boot.kernelParams = [ "usbcore.autosuspend=-1" ]; networking.networkmanager.wifi.powersave = false; - # Allow this headless Turing GPU to enter runtime D3 while unused. - services.udev.extraRules = '' - ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto" - ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on" - ''; - # Favor efficient idle and light-load operation without suspending this # always-on host. The EPP setting retains short performance bursts. powerManagement = {