Compare commits

..

22 Commits

Author SHA1 Message Date
Ash
93c1c03ce6 revert: remove renovate schedule change (moved to separate PR) 2026-03-16 08:01:38 -07:00
Ash
62bc13c575 fix: shift renovate schedules to 5-7 PM Saturday to align with cron
CronJob runs at 0/6/12/18h. Old 2-4 PM window never had a run
inside it, so Renovate never created PRs. Shift to 5-7 PM so the
18:00 run lands in the window. nixpkgs-qt staggered to 7-9 PM.
2026-03-16 08:00:58 -07:00
Ash
091c570249 fix: remove custom sway portal config, let NixOS sway module handle it
All checks were successful
CI / check (pull_request) Successful in 2m45s
CI / build-and-cache (pull_request) Has been skipped
CI / check (push) Successful in 2m42s
CI / build-and-cache (push) Successful in 1m37s
Only wlr.enable is needed — the sway module already sets
xdg.portal.config.sway.default and adding our own conflicts.
2026-03-16 07:45:05 -07:00
Ash
23cde06c35 fix: mkForce sway portal default to resolve conflict with sway module
All checks were successful
CI / check (pull_request) Successful in 2m52s
CI / build-and-cache (pull_request) Has been skipped
2026-03-16 07:42:24 -07:00
Ash
579c5b135e fix: add xdg-desktop-portal-wlr for Sway screen sharing
Some checks failed
CI / check (pull_request) Failing after 1m47s
CI / build-and-cache (pull_request) Has been skipped
Enable wlr portal conditionally when wayland is active.
Add sway-specific portal config routing ScreenCast and
Screenshot interfaces through the wlr backend.
2026-03-16 07:21:45 -07:00
2e38217e13 claude-code: Update to version 2.1.75
All checks were successful
CI / check (push) Successful in 3m43s
CI / build-and-cache (push) Successful in 1m42s
2026-03-13 16:30:52 -07:00
a77352fd81 feat: add perles to CI binary cache
All checks were successful
CI / check (push) Successful in 2m32s
CI / build-and-cache (push) Successful in 2m31s
Extract shared package definition, add to flake packages output
and CI workflow so perles gets built and cached by Harmonia.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:32:13 -07:00
72b78ab25f feat(wireguard): add WireGuard VPN role
All checks were successful
CI / check (push) Successful in 2m35s
CI / build-and-cache (push) Successful in 1m25s
Replace inline wg-quick config in nix-book with a reusable role that
uses inline config instead of configFile, fixing the world-readable
/tmp key leak. Adds network-online.target dependency to prevent boot
failures from DNS not being ready.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 20:07:49 -07:00
60888a4901 fix: block humanlayer:create_handoff from being installed
All checks were successful
CI / check (push) Successful in 2m32s
CI / build-and-cache (push) Successful in 2h54m10s
Skip the create_handoff command during humanlayer plugin installation
and explicitly remove it if previously installed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-09 16:14:29 -07:00
433b41590b Update flake inputs, deduplicate beads/gastown package definitions
Some checks failed
CI / check (push) Successful in 3m39s
CI / build-and-cache (push) Has been cancelled
- Update beads and gastown flake inputs and vendorHashes
- Remove merged-upstream patches for gastown and beads
- Deduplicate beads/gastown build definitions in home role by using
  callPackage to reference shared packages/ definitions
- Pin dolt to v1.82.4 (gastown requires >= 1.82.4)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-09 15:30:08 -07:00
a3d039613f fix: replace removed programs.light with brightnessctl
Some checks failed
CI / check (push) Successful in 4m16s
CI / build-and-cache (push) Failing after 6h12m6s
programs.light was removed from nixpkgs (upstream unmaintained).
brightnessctl is the recommended replacement for Sway/Wayland.
2026-03-05 14:48:43 -08:00
0a85616d58 Update flake inputs, claude-code 2.1.69, doom emacs, rotate wallpaper
Some checks failed
CI / build-and-cache (push) Has been cancelled
CI / check (push) Has been cancelled
2026-03-05 14:48:14 -08:00
c85f047ee2 fix: update gastown vendorHash for Go module changes
Some checks failed
CI / check (push) Successful in 2m10s
CI / build-and-cache (push) Failing after 3m57s
The upstream gastown Go dependencies changed, causing a hash mismatch
in the fixed-output derivation. Updated vendorHash in both:
- packages/gastown/default.nix (flake packages output)
- home/roles/development/default.nix (home-manager inline build)
2026-03-05 09:04:28 -08:00
f4c1de5fb3 fix: add execute permission to rotate-wallpaper.sh
Some checks failed
CI / check (push) Successful in 2m13s
CI / build-and-cache (push) Failing after 3m43s
2026-03-05 07:33:15 -08:00
e2770617c7 emacs: add pi-coding-agent package
Some checks failed
CI / check (push) Successful in 6m50s
CI / build-and-cache (push) Failing after 4m35s
Add dnouri/pi-coding-agent as an Emacs frontend for the pi coding agent.
Pinned to commit 8d8158b.

- Package installed from GitHub with all .el files (includes md-ts-mode)
- Suppress grammar auto-install prompt since tree-sitter grammars are
  already managed by Nix (treesit-grammars.with-all-grammars)
- Keybinding: SPC o p to launch pi-coding-agent
- Alias: M-x pi as shortcut for M-x pi-coding-agent
2026-03-04 11:35:00 -08:00
8fd702cad0 Add pi-coding-agent package, simplify Go builds with unstable.buildGoModule
Some checks failed
CI / build-and-cache (push) Has been cancelled
CI / check (push) Has been cancelled
- Add pi-coding-agent package (v0.55.4) with multi-platform support
- Replace custom Go 1.25.6 override with nixpkgs-unstable buildGoModule
  for beads and perles builds
- Update flake inputs: beads, nixpkgs-unstable, perles
- Update vendor hashes for beads and perles
- Add pi-coding-agent to development role
2026-03-04 11:32:50 -08:00
eb4700226f feat(virtualisation): add waydroid
All checks were successful
CI / check (push) Successful in 4m48s
CI / build-and-cache (push) Successful in 2m37s
2026-02-19 21:31:51 -08:00
d4d7769e51 fix(zix790prors): set Sway output to 164.9Hz for AW3423DWF
Some checks failed
CI / check (push) Failing after 38m14s
CI / build-and-cache (push) Has been cancelled
The monitor refresh rate was only configured via xrandr session commands,
which have no effect on Wayland/Sway sessions, leaving it at 60Hz.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 18:02:44 -08:00
c39f711662 chore: update beads 0.49.6→0.52.0 and gastown, make gastown a proper flake
All checks were successful
CI / check (push) Successful in 6m4s
CI / build-and-cache (push) Successful in 8m20s
- beads: update to 0.52.0 (16af00d7), refresh vendorHash
- gastown: update to 35157d02, remove flake=false now that upstream has flake.nix
- gastown: add inputs.nixpkgs.follows and inputs.beads.follows to deduplicate deps
- Clean up stale comments

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-02-18 09:44:11 -08:00
4dd53a0dd0 feat(dev): add Claude Code statusline config via activation hook
All checks were successful
CI / check (push) Successful in 3m48s
CI / build-and-cache (push) Successful in 2m27s
2026-02-17 10:32:33 -08:00
4945a9e339 chore(config): migrate config renovate.json
All checks were successful
CI / check (pull_request) Successful in 3m33s
CI / build-and-cache (pull_request) Has been skipped
CI / check (push) Successful in 3m39s
CI / build-and-cache (push) Successful in 2h59m16s
2026-02-15 08:02:23 +00:00
c50c90ab13 Merge pull request 'Skip already-cached packages in CI build-and-cache' (#43) from fix/ci-skip-cached-packages into main
Some checks failed
CI / check (push) Successful in 4m52s
CI / build-and-cache (push) Has been cancelled
2026-02-14 18:26:31 -08:00
33 changed files with 359 additions and 646 deletions

View File

@@ -50,6 +50,7 @@ jobs:
custom-rclone-torbox-setup
custom-beads
custom-gastown
custom-perles
qt-pinned-jellyfin-media-player
qt-pinned-stremio
nix-deck-kernel

101
flake.lock generated
View File

@@ -2,17 +2,16 @@
"nodes": {
"beads": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1770711800,
"narHash": "sha256-A7S9C5NBhrmf60wxEZiWTOn07eUPEk1d75LixLDedc0=",
"lastModified": 1773070962,
"narHash": "sha256-kHZXx+kygpVholOBsuQocCtksHo5ZWYskP64qK2Kjh0=",
"owner": "steveyegge",
"repo": "beads",
"rev": "6a51223b6fb59f97e699d5ac2f9a93967ca66f28",
"rev": "9604d30b7c746f9f04f6dea5f82996f71bb66073",
"type": "github"
},
"original": {
@@ -24,11 +23,11 @@
"doomemacs": {
"flake": false,
"locked": {
"lastModified": 1770765473,
"narHash": "sha256-tEuhgaenYbeScYGV2gDivn468kHk+k6lndlxSPNYTes=",
"lastModified": 1772615218,
"narHash": "sha256-z+3c0AGkrMf1xZ+pq57aVp4Zo4KsqFMIjEVzSZinghc=",
"owner": "doomemacs",
"repo": "doomemacs",
"rev": "a0d6aac43fc94def29c98826e2f0088bcb703d13",
"rev": "d23bbe87721c61f4d5a605f2914b32780bb89949",
"type": "github"
},
"original": {
@@ -47,11 +46,11 @@
]
},
"locked": {
"lastModified": 1770602774,
"narHash": "sha256-eRcZ279Oaf8ViHtvdWVTpcD9x7bvJ3ipQ1Xq9bd+qlk=",
"lastModified": 1772706147,
"narHash": "sha256-C0UMYQg3KBU6+L8TLfQ/s60O6/Tiu/JpN8C/WiIH9DU=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "a3d87c21d1464f1069d8125cafe6adb84d200185",
"rev": "54af2ae96631311dc4d2686a07e4f472fb36f516",
"type": "github"
},
"original": {
@@ -79,13 +78,21 @@
}
},
"gastown": {
"flake": false,
"inputs": {
"beads": [
"beads"
],
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1770789619,
"narHash": "sha256-BDtohweSxBBLM+bAouzsK6tvAo5bZPUviK/ITMIyUag=",
"lastModified": 1773088127,
"narHash": "sha256-gJFayiBYrF0Q99AOQH29uq0Mli8KRfwReYeAh5H5evY=",
"owner": "steveyegge",
"repo": "gastown",
"rev": "2779e30fd35c3482912b22e4be89258fe5510167",
"rev": "8da798be0663af74be7960844b90038e51769203",
"type": "github"
},
"original": {
@@ -121,11 +128,11 @@
]
},
"locked": {
"lastModified": 1768949235,
"narHash": "sha256-TtjKgXyg1lMfh374w5uxutd6Vx2P/hU81aEhTxrO2cg=",
"lastModified": 1772633058,
"narHash": "sha256-SO7JapRy2HPhgmqiLbfnW1kMx5rakPMKZ9z3wtRLQjI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "75ed713570ca17427119e7e204ab3590cc3bf2a5",
"rev": "080657a04188aca25f8a6c70a0fb2ea7e37f1865",
"type": "github"
},
"original": {
@@ -142,11 +149,11 @@
]
},
"locked": {
"lastModified": 1769397130,
"narHash": "sha256-TTM4KV9IHwa181X7afBRbhLJIrgynpDjAXJFMUOWfyU=",
"lastModified": 1772633327,
"narHash": "sha256-jl+DJB2DUx7EbWLRng+6HNWW/1/VQOnf0NsQB4PlA7I=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c37679d37bdbecf11bbe3c5eb238d89ca4f60641",
"rev": "5a75730e6f21ee624cbf86f4915c6e7489c74acc",
"type": "github"
},
"original": {
@@ -164,11 +171,11 @@
]
},
"locked": {
"lastModified": 1769273817,
"narHash": "sha256-+iyLihi/ynJokMgJZMRXuMuI6DPGUQRajz5ztNCHgnI=",
"lastModified": 1772517207,
"narHash": "sha256-qxHfxqbigqBTn//U4leIS5he22Wp1GS0+zmwGV7Pozs=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "98f988ad46e31f9956c5f6874dfb3580a7ff3969",
"rev": "7ca1501c2d80900b5967baea4d42581f84b388dd",
"type": "github"
},
"original": {
@@ -184,11 +191,11 @@
]
},
"locked": {
"lastModified": 1767634391,
"narHash": "sha256-owcSz2ICqTSvhBbhPP+1eWzi88e54rRZtfCNE5E/wwg=",
"lastModified": 1772129556,
"narHash": "sha256-Utk0zd8STPsUJPyjabhzPc5BpPodLTXrwkpXBHYnpeg=",
"owner": "nix-darwin",
"repo": "nix-darwin",
"rev": "08585aacc3d6d6c280a02da195fdbd4b9cf083c2",
"rev": "ebec37af18215214173c98cf6356d0aca24a2585",
"type": "github"
},
"original": {
@@ -206,11 +213,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1770887282,
"narHash": "sha256-8vmh9ZSLEuXanLMeiuvAlJCKprBiEBW7N0SbUnMgpfM=",
"lastModified": 1772716420,
"narHash": "sha256-T3UEKNTGqBl44AQ0+0OIpiWMXeQ8+4QW/akSc4yeL2A=",
"owner": "marienz",
"repo": "nix-doom-emacs-unstraightened",
"rev": "a9cdd935c314894dd03287b287cc21c6f8004c7f",
"rev": "be3ecb81a85be302e27d46ff32a1e251e444327d",
"type": "github"
},
"original": {
@@ -243,11 +250,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1769089682,
"narHash": "sha256-9yA/LIuAVQq0lXelrZPjLuLVuZdm03p8tfmHhnDIkms=",
"lastModified": 1772598333,
"narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "078d69f03934859a181e81ba987c2bb033eebfc5",
"rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239",
"type": "github"
},
"original": {
@@ -259,11 +266,11 @@
},
"nixpkgs-qt": {
"locked": {
"lastModified": 1770464364,
"narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=",
"lastModified": 1772598333,
"narHash": "sha256-YaHht/C35INEX3DeJQNWjNaTcPjYmBwwjFJ2jdtr+5U=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "23d72dabcb3b12469f57b37170fcbc1789bd7457",
"rev": "fabb8c9deee281e50b1065002c9828f2cf7b2239",
"type": "github"
},
"original": {
@@ -275,11 +282,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1769170682,
"narHash": "sha256-oMmN1lVQU0F0W2k6OI3bgdzp2YOHWYUAw79qzDSjenU=",
"lastModified": 1772624091,
"narHash": "sha256-QKyJ0QGWBn6r0invrMAK8dmJoBYWoOWy7lN+UHzW1jc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c5296fdd05cfa2c187990dd909864da9658df755",
"rev": "80bdc1e5ce51f56b19791b52b2901187931f5353",
"type": "github"
},
"original": {
@@ -292,11 +299,11 @@
"perles": {
"flake": false,
"locked": {
"lastModified": 1769460725,
"narHash": "sha256-zM2jw+emxe8+mNyR1ebMWkQiEx8uSmhoqqI0IxXLDgs=",
"lastModified": 1772661365,
"narHash": "sha256-kMlvIpfGMBkN5D1W0O1fcqUiH3dyobcH0GRRLCX7GGo=",
"owner": "zjrosen",
"repo": "perles",
"rev": "57b20413eea461452b59e13f5a4a367953b1f768",
"rev": "326ff1938dfe073daab7939762ce2f44c2ee74a1",
"type": "github"
},
"original": {
@@ -315,11 +322,11 @@
]
},
"locked": {
"lastModified": 1767662275,
"narHash": "sha256-d5Q1GmQ+sW1Bt8cgDE0vOihzLaswsm8cSdg8124EqXE=",
"lastModified": 1772361940,
"narHash": "sha256-B1Cz+ydL1iaOnGlwOFld/C8lBECPtzhiy/pP93/CuyY=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "51816be33a1ff0d4b22427de83222d5bfa96d30e",
"rev": "a4b33606111c9c5dcd10009042bb710307174f51",
"type": "github"
},
"original": {
@@ -338,11 +345,11 @@
]
},
"locked": {
"lastModified": 1767662275,
"narHash": "sha256-d5Q1GmQ+sW1Bt8cgDE0vOihzLaswsm8cSdg8124EqXE=",
"lastModified": 1772361940,
"narHash": "sha256-B1Cz+ydL1iaOnGlwOFld/C8lBECPtzhiy/pP93/CuyY=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "51816be33a1ff0d4b22427de83222d5bfa96d30e",
"rev": "a4b33606111c9c5dcd10009042bb710307174f51",
"type": "github"
},
"original": {

View File

@@ -52,7 +52,8 @@
gastown = {
url = "github:steveyegge/gastown";
flake = false; # No flake.nix upstream yet
inputs.nixpkgs.follows = "nixpkgs-unstable";
inputs.beads.follows = "beads";
};
perles = {
@@ -112,6 +113,19 @@
(ufinal: uprev: {
claude-code = uprev.callPackage ./packages/claude-code {};
})
# Pin dolt to v1.82.4 (gastown requires >= 1.82.4)
(ufinal: uprev: {
dolt = uprev.dolt.overrideAttrs (old: rec {
version = "1.82.4";
src = uprev.fetchFromGitHub {
owner = "dolthub";
repo = "dolt";
tag = "v${version}";
hash = "sha256-mavL3y+Kv25hzFlDFXk7W/jeKVKlCBjlc67GkL3Jcwk=";
};
vendorHash = "sha256-K1KzsqptZxO5OraWKIXeqKuVSzb6E/Mjy3c5PQ7Rs9k=";
});
})
];
nixosModules = [
@@ -182,7 +196,16 @@
modules = nixosModules ++ [
./machines/zix790prors/configuration.nix
{
home-manager.users.johno = import ./home/home-desktop.nix;
home-manager.users.johno = {
imports = [ ./home/home-desktop.nix ];
home.roles.i3_sway.extraSwayConfig = {
output = {
"DP-1" = {
mode = "3440x1440@164.900Hz";
};
};
};
};
home-manager.extraSpecialArgs = { inherit system; };
}
];
@@ -265,13 +288,19 @@
"qt-pinned-stremio" = pkgsQt.stremio;
# Flake input packages (beads, gastown) - these get version from input rev
"custom-beads" = pkgs.callPackage ./packages/beads {
inherit (pkgs.unstable) buildGoModule;
src = inputs.beads;
version = "0.49.6-${beadsRev}";
version = "0.52.0-${beadsRev}";
};
"custom-gastown" = pkgs.callPackage ./packages/gastown {
src = inputs.gastown;
version = "unstable-${gastownRev}";
};
"custom-perles" = pkgs.callPackage ./packages/perles {
inherit (pkgs.unstable) buildGoModule;
src = inputs.perles;
version = "unstable-${builtins.substring 0 8 (inputs.perles.rev or "unknown")}";
};
} // (if system == "x86_64-linux" then {
# nix-deck kernel from Jovian-NixOS (Steam Deck) - expensive to build
"nix-deck-kernel" = self.nixosConfigurations.nix-deck.config.boot.kernelPackages.kernel;

View File

@@ -1,44 +0,0 @@
diff --git a/internal/storage/dolt/queries.go b/internal/storage/dolt/queries.go
index 7d8214ee..8acdaae2 100644
--- a/internal/storage/dolt/queries.go
+++ b/internal/storage/dolt/queries.go
@@ -212,8 +212,21 @@ func (s *DoltStore) SearchIssues(ctx context.Context, query string, filter types
}
// nolint:gosec // G201: whereSQL contains column comparisons with ?, limitSQL is a safe integer
+ // Performance fix: SELECT all columns directly instead of id-only + WHERE IN (all_ids)
+ // See: hq-ihwsj - bd list uses inefficient WHERE IN (all_ids) query pattern
querySQL := fmt.Sprintf(`
- SELECT id FROM issues
+ SELECT id, content_hash, title, description, design, acceptance_criteria, notes,
+ status, priority, issue_type, assignee, estimated_minutes,
+ created_at, created_by, owner, updated_at, closed_at, external_ref,
+ compaction_level, compacted_at, compacted_at_commit, original_size, source_repo, close_reason,
+ deleted_at, deleted_by, delete_reason, original_type,
+ sender, ephemeral, pinned, is_template, crystallizes,
+ await_type, await_id, timeout_ns, waiters,
+ hook_bead, role_bead, agent_state, last_activity, role_type, rig, mol_type,
+ event_kind, actor, target, payload,
+ due_at, defer_until,
+ quality_score, work_type, source_system
+ FROM issues
%s
ORDER BY priority ASC, created_at DESC
%s
@@ -225,7 +238,15 @@ func (s *DoltStore) SearchIssues(ctx context.Context, query string, filter types
}
defer rows.Close()
- return s.scanIssueIDs(ctx, rows)
+ var issues []*types.Issue
+ for rows.Next() {
+ issue, err := scanIssueRow(rows)
+ if err != nil {
+ return nil, err
+ }
+ issues = append(issues, issue)
+ }
+ return issues, rows.Err()
}
// GetReadyWork returns issues that are ready to work on (not blocked)

View File

@@ -5,99 +5,25 @@ with lib;
let
cfg = config.home.roles.development;
# Build beads from flake input with corrected vendorHash
# The upstream default.nix has stale vendorHash for commits with server mode
# Build beads and gastown from flake inputs using shared package definitions
beadsRev = builtins.substring 0 8 (globalInputs.beads.rev or "unknown");
# nixpkgs ships Go 1.25.5, but beads' dolt deps require Go >= 1.25.6
go_1_25_6 = pkgs.go_1_25.overrideAttrs (old: rec {
version = "1.25.6";
src = pkgs.fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
hash = "sha256-WMv3ceRNdt5vVtGeM7d9dFoeSJNAkih15GWFuXXCsFk=";
};
});
buildGoModule_1_25_6 = pkgs.buildGoModule.override { go = go_1_25_6; };
beadsPackage = buildGoModule_1_25_6 {
pname = "beads";
version = "0.49.6-${beadsRev}";
beadsPackage = pkgs.callPackage ../../../packages/beads {
src = globalInputs.beads;
subPackages = [ "cmd/bd" ];
doCheck = false;
# Regenerated vendorHash for commit 6a51223b (dolt server mode, Go 1.25.6)
vendorHash = "sha256-9RMy0+ZBFg1BAl8Z0EuZK4XVm9QYVekS9i/1ErOIB/c=";
nativeBuildInputs = [ pkgs.git pkgs.pkg-config ];
buildInputs = [ pkgs.icu ];
meta = with lib; {
description = "beads (bd) - An issue tracker designed for AI-supervised coding workflows";
homepage = "https://github.com/steveyegge/beads";
license = licenses.mit;
mainProgram = "bd";
};
version = "0.52.0-${beadsRev}";
};
# Gastown - multi-agent workspace manager (no upstream flake.nix yet)
# Source is tracked via flake input for renovate updates
gastownRev = builtins.substring 0 8 (globalInputs.gastown.rev or "unknown");
gastownPackage = pkgs.buildGoModule {
pname = "gastown";
version = "unstable-${gastownRev}";
gastownPackage = pkgs.callPackage ../../../packages/gastown {
src = globalInputs.gastown;
vendorHash = "sha256-ripY9vrYgVW8bngAyMLh0LkU/Xx1UUaLgmAA7/EmWQU=";
subPackages = [ "cmd/gt" ];
doCheck = false;
# Must match ldflags from gastown Makefile - BuiltProperly=1 is required
# or gt will error with "This binary was built with 'go build' directly"
ldflags = [
"-X github.com/steveyegge/gastown/internal/cmd.Version=${gastownRev}"
"-X github.com/steveyegge/gastown/internal/cmd.Commit=${gastownRev}"
"-X github.com/steveyegge/gastown/internal/cmd.BuildTime=nix-build"
"-X github.com/steveyegge/gastown/internal/cmd.BuiltProperly=1"
];
# Bug fixes not yet merged upstream
# Each patch is stored in a separate file for clarity and maintainability
patches = [
# Fix validateRecipient bug: normalize addresses before comparison
./gastown-fix-validate-recipient.patch
# Fix agentBeadToAddress to use title field for hq- prefixed beads
./gastown-fix-agent-bead-address-title.patch
# town-root-detection fix merged upstream (detectRole removed)
# Statusline optimization: skip expensive beads queries for detached sessions
# Reduces Dolt CPU from ~70% to ~20% by caching and early-exit
./gastown-statusline-optimization.patch
];
meta = with lib; {
description = "Gas Town - multi-agent workspace manager by Steve Yegge";
homepage = "https://github.com/steveyegge/gastown";
license = licenses.mit;
mainProgram = "gt";
};
version = "unstable-${gastownRev}";
};
# Perles - TUI for beads issue tracking (no upstream flake.nix yet)
# Source is tracked via flake input for renovate updates
# Build perles from flake input using shared package definition
perlesRev = builtins.substring 0 8 (globalInputs.perles.rev or "unknown");
perlesPackage = pkgs.buildGoModule {
pname = "perles";
version = "unstable-${perlesRev}";
perlesPackage = pkgs.callPackage ../../../packages/perles {
inherit (pkgs.unstable) buildGoModule;
src = globalInputs.perles;
vendorHash = "sha256-JHERJDzbiqgjWXwRhXVjgDEiDQ3AUXRIONotfPF21B0=";
doCheck = false;
ldflags = [
"-X main.version=${perlesRev}"
];
meta = with lib; {
description = "Perles - Terminal UI for beads issue tracking";
homepage = "https://github.com/zjrosen/perles";
license = licenses.mit;
mainProgram = "perles";
};
version = "unstable-${perlesRev}";
};
# Fetch the claude-plugins repository (for humanlayer commands/agents)
@@ -110,6 +36,12 @@ let
ref = "main";
};
# Claude Code statusline: shows model, cwd, git branch, and context usage %
claudeCodeStatusLineConfig = pkgs.writeText "claude-statusline.json" (builtins.toJSON {
type = "command";
command = ''input=$(cat); model=$(echo "$input" | jq -r '.model.display_name'); cwd=$(echo "$input" | jq -r '.workspace.current_dir'); if git -C "$cwd" rev-parse --git-dir > /dev/null 2>&1; then branch=$(git -C "$cwd" --no-optional-locks rev-parse --abbrev-ref HEAD 2>/dev/null || echo ""); if [ -n "$branch" ]; then git_info=" on $branch"; else git_info=""; fi; else git_info=""; fi; usage=$(echo "$input" | jq '.context_window.current_usage'); if [ "$usage" != "null" ]; then current=$(echo "$usage" | jq '.input_tokens + .cache_creation_input_tokens + .cache_read_input_tokens'); size=$(echo "$input" | jq '.context_window.context_window_size'); pct=$((current * 100 / size)); context_info=" | ''${pct}% context"; else context_info=""; fi; printf "%s in %s%s%s" "$model" "$cwd" "$git_info" "$context_info"'';
});
in
{
options.home.roles.development = {
@@ -138,11 +70,12 @@ in
pkgs.unstable.claude-code
pkgs.unstable.claude-code-router
pkgs.unstable.codex
pkgs.dolt
pkgs.unstable.dolt
pkgs.sqlite
# Custom packages
pkgs.custom.tea-rbw
pkgs.custom.pi-coding-agent
];
# Install Claude Code humanlayer command and agent plugins
@@ -151,6 +84,9 @@ in
rm -f ~/.claude/commands/humanlayer:* 2>/dev/null || true
rm -f ~/.claude/agents/humanlayer:* 2>/dev/null || true
# Remove explicitly blocked commands that may have been installed previously
rm -f ~/.claude/commands/humanlayer:create_handoff.md 2>/dev/null || true
# Create directories if they don't exist
mkdir -p ~/.claude/commands
mkdir -p ~/.claude/agents
@@ -159,6 +95,12 @@ in
for file in ${claudePluginsRepo}/humanlayer/commands/*.md; do
if [ -f "$file" ]; then
filename=$(basename "$file" .md)
# Skip blocked commands
case "$filename" in
create_handoff) continue ;;
esac
dest="$HOME/.claude/commands/humanlayer:''${filename}.md"
rm -f "$dest" 2>/dev/null || true
@@ -251,6 +193,18 @@ in
$DRY_RUN_CMD echo "Claude Code beads integration configured (hooks installed)"
'';
# Configure Claude Code statusline (merge into existing settings.json)
home.activation.claudeCodeStatusLine = lib.hm.dag.entryAfter ["writeBoundary" "claudeCodeBeadsSetup"] ''
SETTINGS="$HOME/.claude/settings.json"
mkdir -p "$HOME/.claude"
if [ -f "$SETTINGS" ]; then
${pkgs.jq}/bin/jq --slurpfile sl ${claudeCodeStatusLineConfig} '.statusLine = $sl[0]' "$SETTINGS" > "''${SETTINGS}.tmp" && mv "''${SETTINGS}.tmp" "$SETTINGS"
else
${pkgs.jq}/bin/jq -n --slurpfile sl ${claudeCodeStatusLineConfig} '{statusLine: $sl[0]}' > "$SETTINGS"
fi
$DRY_RUN_CMD echo "Claude Code statusline configured"
'';
# Beads timer gate checker (Linux only - uses systemd)
# Runs every 5 minutes to auto-resolve expired timer gates across all beads projects
# This enables self-scheduling molecules (watchers, patrols, etc.)

View File

@@ -1,15 +0,0 @@
diff --git a/internal/mail/router.go b/internal/mail/router.go
--- a/internal/mail/router.go
+++ b/internal/mail/router.go
@@ -315,7 +315,10 @@ func agentBeadToAddress(bead *agentBead) string {
}
// For other hq- agents, fall back to description parsing
- return parseAgentAddressFromDescription(bead.Description)
+ if bead.Title != "" && strings.Contains(bead.Title, "/") {
+ return bead.Title
+ }
+ return parseAgentAddressFromDescription(bead.Description)
}
// Handle gt- prefixed IDs (legacy format)

View File

@@ -1,35 +0,0 @@
diff --git a/internal/mail/router.go b/internal/mail/router.go
--- a/internal/mail/router.go
+++ b/internal/mail/router.go
@@ -330,8 +330,29 @@ func agentBeadToAddress(bead *agentBead) string {
}
// Handle gt- prefixed IDs (legacy format)
- if !strings.HasPrefix(id, "gt-") {
- return "" // Not a valid agent bead ID
+ // Handle rig-specific prefixes: <prefix>-<rig>-<role>-<name>
+ // Examples: j-java-crew-americano -> java/crew/americano
+ idParts := strings.Split(id, "-")
+ if len(idParts) >= 3 {
+ for i, part := range idParts {
+ if part == "crew" || part == "polecat" || part == "polecats" {
+ if i >= 1 && i < len(idParts)-1 {
+ rig := idParts[i-1]
+ name := strings.Join(idParts[i+1:], "-")
+ return rig + "/" + part + "/" + name
+ }
+ }
+ if part == "witness" || part == "refinery" {
+ if i >= 1 {
+ return idParts[i-1] + "/" + part
+ }
+ }
+ }
+ }
+
+ // Handle gt- prefixed IDs (legacy format)
+ if !strings.HasPrefix(id, "gt-") {
+ return "" // Not a valid agent bead ID
}
// Strip prefix

View File

@@ -1,25 +0,0 @@
diff --git a/internal/git/git.go b/internal/git/git.go
--- a/internal/git/git.go
+++ b/internal/git/git.go
@@ -73,7 +73,19 @@ func copyDir(src, dest string) error {
srcPath := filepath.Join(src, entry.Name())
destPath := filepath.Join(dest, entry.Name())
- if entry.IsDir() {
+ // Handle symlinks (recreate them, do not follow)
+ if entry.Type()&os.ModeSymlink != 0 {
+ linkTarget, err := os.Readlink(srcPath)
+ if err != nil {
+ return err
+ }
+ if err := os.Symlink(linkTarget, destPath); err != nil {
+ return err
+ }
+ continue
+ }
+
+ if entry.IsDir() {
if err := copyDir(srcPath, destPath); err != nil {
return err
}

View File

@@ -1,18 +0,0 @@
diff --git a/internal/cmd/role.go b/internal/cmd/role.go
--- a/internal/cmd/role.go
+++ b/internal/cmd/role.go
@@ -326,11 +326,11 @@ func getRoleHome(role Role, rig, polecat, townRoot string) string {
if rig == "" || polecat == "" {
return ""
}
- return filepath.Join(townRoot, rig, "polecats", polecat, "rig")
+ return filepath.Join(townRoot, rig, "polecats", polecat)
case RoleCrew:
if rig == "" || polecat == "" {
return ""
}
- return filepath.Join(townRoot, rig, "crew", polecat, "rig")
+ return filepath.Join(townRoot, rig, "crew", polecat)
default:
return ""
}

View File

@@ -1,18 +0,0 @@
diff --git a/internal/cmd/prime.go b/internal/cmd/prime.go
--- a/internal/cmd/prime.go
+++ b/internal/cmd/prime.go
@@ -276,11 +276,12 @@ func detectRole(cwd, townRoot string) RoleInfo {
// Check for mayor role
// At town root, or in mayor/ or mayor/rig/
if relPath == "." || relPath == "" {
- ctx.Role = RoleMayor
- return ctx
+ return ctx // RoleUnknown - town root is shared space
}
+
+ // Check for mayor role: mayor/ or mayor/rig/
if len(parts) >= 1 && parts[0] == "mayor" {
ctx.Role = RoleMayor
return ctx
}

View File

@@ -1,13 +0,0 @@
diff --git a/internal/mail/router.go b/internal/mail/router.go
index b864c069..4b6a045b 100644
--- a/internal/mail/router.go
+++ b/internal/mail/router.go
@@ -646,7 +646,7 @@ func (r *Router) validateRecipient(identity string) error {
}
for _, agent := range agents {
- if agentBeadToAddress(agent) == identity {
+ if AddressToIdentity(agentBeadToAddress(agent)) == AddressToIdentity(identity) {
return nil // Found matching agent
}
}

View File

@@ -1,135 +0,0 @@
diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
index 2edf1be8..00253eea 100644
--- a/internal/cmd/statusline.go
+++ b/internal/cmd/statusline.go
@@ -6,6 +6,7 @@ import (
"path/filepath"
"sort"
"strings"
+ "time"
"github.com/spf13/cobra"
"github.com/steveyegge/gastown/internal/beads"
@@ -14,6 +15,37 @@ import (
"github.com/steveyegge/gastown/internal/tmux"
"github.com/steveyegge/gastown/internal/workspace"
)
+// statusLineCacheTTL is how long cached status output remains valid.
+const statusLineCacheTTL = 10 * time.Second
+
+// statusLineCachePath returns the cache file path for a session.
+func statusLineCachePath(session string) string {
+ return filepath.Join(os.TempDir(), fmt.Sprintf("gt-status-%s", session))
+}
+
+// getStatusLineCache returns cached status if fresh, empty string otherwise.
+func getStatusLineCache(session string) string {
+ path := statusLineCachePath(session)
+ info, err := os.Stat(path)
+ if err != nil {
+ return ""
+ }
+ if time.Since(info.ModTime()) > statusLineCacheTTL {
+ return ""
+ }
+ data, err := os.ReadFile(path)
+ if err != nil {
+ return ""
+ }
+ return string(data)
+}
+
+// setStatusLineCache writes status to cache file.
+func setStatusLineCache(session, status string) {
+ path := statusLineCachePath(session)
+ _ = os.WriteFile(path, []byte(status), 0644)
+}
+
var (
statusLineSession string
@@ -34,6 +66,19 @@ func init() {
func runStatusLine(cmd *cobra.Command, args []string) error {
t := tmux.NewTmux()
+ // Optimization: skip expensive beads queries for detached sessions
+ if statusLineSession != "" {
+ if !t.IsSessionAttached(statusLineSession) {
+ fmt.Print("○ |")
+ return nil
+ }
+ // Check cache for attached sessions too
+ if cached := getStatusLineCache(statusLineSession); cached != "" {
+ fmt.Print(cached)
+ return nil
+ }
+ }
+
// Get session environment
var rigName, polecat, crew, issue, role string
@@ -150,7 +195,11 @@ func runWorkerStatusLine(t *tmux.Tmux, session, rigName, polecat, crew, issue st
// Output
if len(parts) > 0 {
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
+ setStatusLineCache(statusLineSession, output)
+ }
+ fmt.Print(output)
}
return nil
@@ -389,7 +438,11 @@ func runMayorStatusLine(t *tmux.Tmux) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
+ setStatusLineCache(statusLineSession, output)
+ }
+ fmt.Print(output)
return nil
}
@@ -458,7 +511,11 @@ func runDeaconStatusLine(t *tmux.Tmux) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
+ setStatusLineCache(statusLineSession, output)
+ }
+ fmt.Print(output)
return nil
}
@@ -526,7 +583,11 @@ func runWitnessStatusLine(t *tmux.Tmux, rigName string) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
+ setStatusLineCache(statusLineSession, output)
+ }
+ fmt.Print(output)
return nil
}
@@ -617,7 +678,11 @@ func runRefineryStatusLine(t *tmux.Tmux, rigName string) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
+ setStatusLineCache(statusLineSession, output)
+ }
+ fmt.Print(output)
return nil
}

View File

@@ -8,8 +8,8 @@ let
doomEmacs = pkgs.fetchFromGitHub {
owner = "doomemacs";
repo = "doomemacs";
rev = "38d94da67dc84897a4318714dcc48494c016d8c4";
sha256 = "sha256-Uc6qONH3jjUVDgW+pPBCGC7mh88ZY05u1y37fQrsxq0=";
rev = "d23bbe87721c61f4d5a605f2914b32780bb89949";
sha256 = "sha256-z+3c0AGkrMf1xZ+pq57aVp4Zo4KsqFMIjEVzSZinghc=";
};
# Shared emacs packages

View File

@@ -274,6 +274,18 @@ rbw is unavailable or the entry is not found."
(error (format "Error listing directory %s: %s" dirpath (error-message-string err)))))
:args (list '(:name "dirpath" :type "string" :description "Directory path to list"))))
(use-package! pi-coding-agent
:commands (pi-coding-agent pi-coding-agent-toggle)
:init
(defalias 'pi 'pi-coding-agent)
(map! :leader
(:prefix ("o" . "open")
:desc "Pi Coding Agent" "p" #'pi-coding-agent))
:config
;; Tree-sitter grammars are managed by Nix (treesit-grammars.with-all-grammars),
;; so suppress the auto-install prompt
(setq pi-coding-agent-essential-grammar-action 'warn))
(use-package! claude-code-ide
:commands (claude-code-ide-menu claude-code-ide-open-here)
:init

View File

@@ -72,3 +72,8 @@
:recipe (:type git :repo "https://codeberg.org/ctietze/beads.el.git"
:files ("lisp/*.el"))
:pin "f40a6461d3c0fa0969311bbb6a1e30d1bba86c88")
(package! pi-coding-agent
:recipe (:host github :repo "dnouri/pi-coding-agent"
:files ("*.el"))
:pin "8d8158b0a6150ce13d91e561a1223790670acaa7")

View File

@@ -2,7 +2,7 @@
# The currentIndex is incremented by `nix run .#rotate-wallpaper`
# and gets committed as part of `nix run .#upgrade`
{
currentIndex = 1; # Index into wallpapers list
currentIndex = 2; # Index into wallpapers list
wallpapers = [
{

View File

@@ -38,7 +38,24 @@
enable = true;
extraGroups = [ "video" ];
};
virtualisation.enable = true;
virtualisation = {
enable = true;
waydroid = true;
};
wireguard = {
enable = true;
autostart = true;
interfaceName = "ogleNet";
address = [ "192.168.4.2/32" ];
privateKeyFile = "/etc/wireguard/oglehome-private-key";
dns = [ "192.168.4.1" ];
peers = [{
publicKey = "AWkmtaz0poyyKJGnRcabO5ecd6ESh1lKu+XRb3ObxBc=";
endpoint = "pi.johnogle.info:6666";
allowedIPs = [ "0.0.0.0/0" ];
persistentKeepalive = 25;
}];
};
};
# Bootloader.
@@ -58,13 +75,6 @@
# Enable networking
networking.networkmanager.enable = true;
# WireGuard setup
networking.wg-quick.interfaces = {
ogleNet = {
configFile = "/root/Oglehome-VPN-johno-nixbook.conf";
};
};
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [

View File

@@ -1,10 +1,7 @@
# Beads package - issue tracker for AI-supervised coding workflows
# Takes src as argument so it can be called from both overlay and flake packages
{ lib
, stdenv
, buildGoModule
, fetchurl
, go_1_25
, git
, pkg-config
, icu
@@ -12,24 +9,12 @@
, version ? "unknown"
}:
let
# nixpkgs ships Go 1.25.5, but beads' dolt deps require Go >= 1.25.6
go_1_25_6 = go_1_25.overrideAttrs (old: rec {
version = "1.25.6";
src = fetchurl {
url = "https://go.dev/dl/go${version}.src.tar.gz";
hash = "sha256-WMv3ceRNdt5vVtGeM7d9dFoeSJNAkih15GWFuXXCsFk=";
};
});
buildGoModule_1_25_6 = buildGoModule.override { go = go_1_25_6; };
in
buildGoModule_1_25_6 {
buildGoModule {
pname = "beads";
inherit version src;
subPackages = [ "cmd/bd" ];
doCheck = false;
# Regenerated vendorHash for commit 6a51223b (dolt server mode, Go 1.25.6)
vendorHash = "sha256-9RMy0+ZBFg1BAl8Z0EuZK4XVm9QYVekS9i/1ErOIB/c=";
vendorHash = "sha256-XAhe4yuLzP9vQ3IFhWAO5fN/3OOfokcRxfeGKaRYEws=";
nativeBuildInputs = [ git pkg-config ];
buildInputs = [ icu ];
meta = with lib; {

View File

@@ -6,24 +6,24 @@
}:
let
version = "2.1.32";
version = "2.1.75";
srcs = {
aarch64-darwin = {
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/darwin-arm64/claude";
sha256 = "841ac3051c04480a5651bc9f4ae27ab9d3963477250e71892e4d6e05778dd9d3";
sha256 = "8c541a5e924eda2070eaf1702a48047af671c4dff6a11a5e762076614a082675";
};
x86_64-darwin = {
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/darwin-x64/claude";
sha256 = "2b8a57be5640076e17d23e47e9288f2d1faee6564f4e311b5f7132bfde73fded";
sha256 = "82c90b91a0a18f60191f817b9b42304d8b17dbed75795b715c41f4fdfe4c782d";
};
x86_64-linux = {
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/linux-x64/claude";
sha256 = "96cd1ba796772481bd49bd67e3b8484565d1f3a99662565516c3bfe16d9afd4a";
sha256 = "328b0a429c05a04f911157d886be5123cf1824a19ba8ca1f9d594c004eac32c9";
};
aarch64-linux = {
url = "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/${version}/linux-arm64/claude";
sha256 = "6f8390c0fde5b802ff777ab54225233f6159d76913adc3b8aea7c8774fa8fe70";
sha256 = "ec8f4f7f7bb50611dae70c109a76ee1da6a3ab45511c65f117df215848ecc905";
};
};

View File

@@ -5,4 +5,5 @@
claude-code = pkgs.callPackage ./claude-code {};
mcrcon-rbw = pkgs.callPackage ./mcrcon-rbw {};
rclone-torbox-setup = pkgs.callPackage ./rclone-torbox-setup {};
pi-coding-agent = pkgs.callPackage ./pi-coding-agent {};
}

View File

@@ -9,7 +9,7 @@
buildGoModule {
pname = "gastown";
inherit version src;
vendorHash = "sha256-ripY9vrYgVW8bngAyMLh0LkU/Xx1UUaLgmAA7/EmWQU=";
vendorHash = "sha256-8SdvSASP+bJjMooqEQvkCzG+J6CbsK+HCQulrPnJZ1Y=";
subPackages = [ "cmd/gt" ];
doCheck = false;
@@ -22,13 +22,6 @@ buildGoModule {
"-X github.com/steveyegge/gastown/internal/cmd.BuiltProperly=1"
];
# Bug fixes not yet merged upstream
patches = [
./gastown-fix-validate-recipient.patch
./gastown-fix-agent-bead-address-title.patch
./gastown-statusline-optimization.patch
];
meta = with lib; {
description = "Gas Town - multi-agent workspace manager by Steve Yegge";
homepage = "https://github.com/steveyegge/gastown";

View File

@@ -1,15 +0,0 @@
diff --git a/internal/mail/router.go b/internal/mail/router.go
--- a/internal/mail/router.go
+++ b/internal/mail/router.go
@@ -315,7 +315,10 @@ func agentBeadToAddress(bead *agentBead) string {
}
// For other hq- agents, fall back to description parsing
- return parseAgentAddressFromDescription(bead.Description)
+ if bead.Title != "" && strings.Contains(bead.Title, "/") {
+ return bead.Title
+ }
+ return parseAgentAddressFromDescription(bead.Description)
}
// Handle gt- prefixed IDs (legacy format)

View File

@@ -1,13 +0,0 @@
diff --git a/internal/mail/router.go b/internal/mail/router.go
index b864c069..4b6a045b 100644
--- a/internal/mail/router.go
+++ b/internal/mail/router.go
@@ -646,7 +646,7 @@ func (r *Router) validateRecipient(identity string) error {
}
for _, agent := range agents {
- if agentBeadToAddress(agent) == identity {
+ if AddressToIdentity(agentBeadToAddress(agent)) == AddressToIdentity(identity) {
return nil // Found matching agent
}
}

View File

@@ -1,135 +0,0 @@
diff --git a/internal/cmd/statusline.go b/internal/cmd/statusline.go
index 2edf1be8..00253eea 100644
--- a/internal/cmd/statusline.go
+++ b/internal/cmd/statusline.go
@@ -6,6 +6,7 @@ import (
"path/filepath"
"sort"
"strings"
+ "time"
"github.com/spf13/cobra"
"github.com/steveyegge/gastown/internal/beads"
@@ -14,6 +15,37 @@ import (
"github.com/steveyegge/gastown/internal/tmux"
"github.com/steveyegge/gastown/internal/workspace"
)
+// statusLineCacheTTL is how long cached status output remains valid.
+const statusLineCacheTTL = 10 * time.Second
+
+// statusLineCachePath returns the cache file path for a session.
+func statusLineCachePath(session string) string {
+ return filepath.Join(os.TempDir(), fmt.Sprintf("gt-status-%s", session))
+}
+
+// getStatusLineCache returns cached status if fresh, empty string otherwise.
+func getStatusLineCache(session string) string {
+ path := statusLineCachePath(session)
+ info, err := os.Stat(path)
+ if err != nil {
+ return ""
+ }
+ if time.Since(info.ModTime()) > statusLineCacheTTL {
+ return ""
+ }
+ data, err := os.ReadFile(path)
+ if err != nil {
+ return ""
+ }
+ return string(data)
+}
+
+// setStatusLineCache writes status to cache file.
+func setStatusLineCache(session, status string) {
+ path := statusLineCachePath(session)
+ _ = os.WriteFile(path, []byte(status), 0644)
+}
+
var (
statusLineSession string
@@ -34,6 +66,19 @@ func init() {
func runStatusLine(cmd *cobra.Command, args []string) error {
t := tmux.NewTmux()
+ // Optimization: skip expensive beads queries for detached sessions
+ if statusLineSession != "" {
+ if !t.IsSessionAttached(statusLineSession) {
+ fmt.Print("○ |")
+ return nil
+ }
+ // Check cache for attached sessions too
+ if cached := getStatusLineCache(statusLineSession); cached != "" {
+ fmt.Print(cached)
+ return nil
+ }
+ }
+
// Get session environment
var rigName, polecat, crew, issue, role string
@@ -150,7 +195,11 @@ func runWorkerStatusLine(t *tmux.Tmux, session, rigName, polecat, crew, issue st
// Output
if len(parts) > 0 {
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
+ setStatusLineCache(statusLineSession, output)
+ }
+ fmt.Print(output)
}
return nil
@@ -389,7 +438,11 @@ func runMayorStatusLine(t *tmux.Tmux) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
+ setStatusLineCache(statusLineSession, output)
+ }
+ fmt.Print(output)
return nil
}
@@ -458,7 +511,11 @@ func runDeaconStatusLine(t *tmux.Tmux) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
+ setStatusLineCache(statusLineSession, output)
+ }
+ fmt.Print(output)
return nil
}
@@ -526,7 +583,11 @@ func runWitnessStatusLine(t *tmux.Tmux, rigName string) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
+ setStatusLineCache(statusLineSession, output)
+ }
+ fmt.Print(output)
return nil
}
@@ -617,7 +678,11 @@ func runRefineryStatusLine(t *tmux.Tmux, rigName string) error {
}
}
- fmt.Print(strings.Join(parts, " | ") + " |")
+ output := strings.Join(parts, " | ") + " |"
+ if statusLineSession != "" {
+ setStatusLineCache(statusLineSession, output)
+ }
+ fmt.Print(output)
return nil
}

View File

@@ -0,0 +1,25 @@
# Perles - Terminal UI for beads issue tracking
# Takes src as argument so it can be called from both overlay and flake packages
{ lib
, buildGoModule
, src
, version ? "unknown"
}:
buildGoModule {
pname = "perles";
inherit version src;
doCheck = false;
vendorHash = "sha256-A5LE9Cor/DRcJtVpiScSoqDYhJIKyaq0cbK+OGmr4XU=";
ldflags = [
"-X main.version=${version}"
];
meta = with lib; {
description = "Perles - Terminal UI for beads issue tracking";
homepage = "https://github.com/zjrosen/perles";
license = licenses.mit;
mainProgram = "perles";
};
}

View File

@@ -0,0 +1,79 @@
{ lib
, stdenv
, fetchurl
, patchelf
, glibc
, makeWrapper
}:
let
version = "0.55.4";
srcs = {
aarch64-darwin = {
url = "https://github.com/badlogic/pi-mono/releases/download/v${version}/pi-darwin-arm64.tar.gz";
sha256 = "0vsav9frvnzskk6p6j60i7klrs3m8lphhyi4c39mv2mvhpm8fkl5";
};
x86_64-darwin = {
url = "https://github.com/badlogic/pi-mono/releases/download/v${version}/pi-darwin-x64.tar.gz";
sha256 = "1377rvhsiiww1bbpgv2v46fjm7iz2smmh8g2yhm28kbsq3gwvvr0";
};
x86_64-linux = {
url = "https://github.com/badlogic/pi-mono/releases/download/v${version}/pi-linux-x64.tar.gz";
sha256 = "1wnfwnkfq5ffz6wyqyhciv4lz06bpxims0hv0dlhz0f9vliyc1md";
};
aarch64-linux = {
url = "https://github.com/badlogic/pi-mono/releases/download/v${version}/pi-linux-arm64.tar.gz";
sha256 = "00fp37hgjl40kc59jfpv189i7np53ymm037hvds6k9y2sz818wjy";
};
};
src = srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
in stdenv.mkDerivation {
pname = "pi-coding-agent";
inherit version;
src = fetchurl {
inherit (src) url sha256;
};
sourceRoot = "pi";
# Bun standalone binaries have JS code appended after the ELF sections
dontStrip = true;
dontPatchELF = true;
nativeBuildInputs = [ makeWrapper ]
++ lib.optionals stdenv.isLinux [ patchelf ];
installPhase = ''
runHook preInstall
# Install the full pi directory structure (binary + supporting files)
mkdir -p $out/lib/pi-coding-agent
cp -r . $out/lib/pi-coding-agent/
# Create bin wrapper that runs the binary from its lib directory
# (pi expects supporting files like themes and wasm relative to itself)
mkdir -p $out/bin
makeWrapper $out/lib/pi-coding-agent/pi $out/bin/pi
runHook postInstall
'';
# Manually patch the interpreter for bun standalone binaries on Linux
postFixup = lib.optionalString stdenv.isLinux ''
interpreter="${glibc}/lib/${if stdenv.hostPlatform.system == "aarch64-linux" then "ld-linux-aarch64.so.1" else "ld-linux-x86-64.so.2"}"
patchelf --set-interpreter "$interpreter" $out/lib/pi-coding-agent/pi
'';
meta = with lib; {
description = "Minimal terminal coding agent with extensible tools and session management";
homepage = "https://github.com/badlogic/pi-mono/tree/main/packages/coding-agent";
license = licenses.mit;
maintainers = [ ];
platforms = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" "aarch64-linux" ];
mainProgram = "pi";
};
}

View File

@@ -87,7 +87,7 @@
"/gastown/"
],
"schedule": [
"before 6am every day"
"before 6am"
],
"automerge": false
},
@@ -100,7 +100,7 @@
"/beads/"
],
"schedule": [
"before 6am every day"
"before 6am"
],
"automerge": false
}

View File

@@ -19,6 +19,7 @@ with lib;
./spotifyd
./users
./virtualisation
./wireguard
];
config = {

View File

@@ -17,9 +17,10 @@ in
services.gnome.gnome-keyring.enable = true;
programs.kdeconnect.enable = true;
# XDG Desktop Portal for default application handling in non-KDE environments
# XDG Desktop Portal for default application handling
xdg.portal = {
enable = true;
wlr.enable = cfg.wayland; # xdg-desktop-portal-wlr for Sway screen sharing
extraPortals = with pkgs; [
kdePackages.xdg-desktop-portal-kde # For KDE application integration
xdg-desktop-portal-gtk # Fallback for GTK applications

View File

@@ -11,9 +11,8 @@ in
enable = true;
wrapperFeatures.gtk = true;
};
programs.light.enable = true;
environment.systemPackages = with pkgs; [
brightnessctl
grim
slurp
wl-clipboard

View File

@@ -13,6 +13,11 @@ in
default = [ "johno" ];
description = "List of users to add to the docker group";
};
waydroid = mkOption {
type = types.bool;
default = false;
description = "Enable waydroid support";
};
};
config = mkIf cfg.enable
@@ -21,5 +26,6 @@ in
programs.virt-manager.enable = true;
virtualisation.docker.enable = true;
users.extraGroups.docker.members = cfg.dockerUsers;
virtualisation.waydroid.enable = cfg.waydroid;
};
}

View File

@@ -0,0 +1,71 @@
{ config, lib, ... }:
with lib;
let
cfg = config.roles.wireguard;
in
{
options.roles.wireguard = {
enable = mkEnableOption "Enable WireGuard VPN";
interfaceName = mkOption {
type = types.str;
default = "wg0";
description = "Name of the WireGuard interface";
};
address = mkOption {
type = types.listOf types.str;
description = "Address(es) for the WireGuard interface";
};
privateKeyFile = mkOption {
type = types.path;
description = "Path to a root-owned file containing the WireGuard private key";
};
dns = mkOption {
type = types.listOf types.str;
default = [];
description = "DNS servers to use when the tunnel is active";
};
peers = mkOption {
type = types.listOf (types.submodule {
options = {
publicKey = mkOption {
type = types.str;
description = "Public key of the peer";
};
endpoint = mkOption {
type = types.str;
description = "Endpoint address of the peer (host:port)";
};
allowedIPs = mkOption {
type = types.listOf types.str;
description = "List of allowed IP ranges for this peer";
};
persistentKeepalive = mkOption {
type = types.int;
default = 25;
description = "Persistent keepalive interval in seconds";
};
};
});
description = "WireGuard peers";
};
autostart = mkOption {
type = types.bool;
default = false;
description = "Whether to start the VPN automatically on boot";
};
};
config = mkIf cfg.enable {
networking.wg-quick.interfaces.${cfg.interfaceName} = {
inherit (cfg) address dns autostart peers;
privateKeyFile = cfg.privateKeyFile;
};
systemd.services."wg-quick-${cfg.interfaceName}" = {
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
};
};
}

0
scripts/rotate-wallpaper.sh Normal file → Executable file
View File