Compare commits
6 Commits
ash/plasma
...
ash/fix-re
| Author | SHA1 | Date | |
|---|---|---|---|
| d5432efa13 | |||
| 2e38217e13 | |||
| a77352fd81 | |||
| 72b78ab25f | |||
| 60888a4901 | |||
| 433b41590b |
@@ -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
|
||||
|
||||
12
flake.lock
generated
12
flake.lock
generated
@@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772587450,
|
||||
"narHash": "sha256-yJ38xi6nRnEZIV5CEgV8xZK1dky0dVMavfFg4J7gkqw=",
|
||||
"lastModified": 1773070962,
|
||||
"narHash": "sha256-kHZXx+kygpVholOBsuQocCtksHo5ZWYskP64qK2Kjh0=",
|
||||
"owner": "steveyegge",
|
||||
"repo": "beads",
|
||||
"rev": "7f41edd9c4350e5c68ebec6f9571e27833f27133",
|
||||
"rev": "9604d30b7c746f9f04f6dea5f82996f71bb66073",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -88,11 +88,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772724442,
|
||||
"narHash": "sha256-+H/T745sVDJAztpf3k6zz89YNrpCYsGghbO7O3O/IHw=",
|
||||
"lastModified": 1773088127,
|
||||
"narHash": "sha256-gJFayiBYrF0Q99AOQH29uq0Mli8KRfwReYeAh5H5evY=",
|
||||
"owner": "steveyegge",
|
||||
"repo": "gastown",
|
||||
"rev": "112ff2c4bd145de796d20f35d35e583832a72ce1",
|
||||
"rev": "8da798be0663af74be7960844b90038e51769203",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
19
flake.nix
19
flake.nix
@@ -113,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 = [
|
||||
@@ -172,7 +185,6 @@
|
||||
./machines/boxy/configuration.nix
|
||||
{
|
||||
home-manager.users.johno = import ./home/home-media-center.nix;
|
||||
# kodi user: AVR volume control + minimal Plasma config for Bigscreen session
|
||||
home-manager.users.kodi = import ./home/home-kodi.nix;
|
||||
home-manager.extraSpecialArgs = { inherit system; };
|
||||
}
|
||||
@@ -284,6 +296,11 @@
|
||||
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;
|
||||
|
||||
@@ -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)
|
||||
@@ -5,87 +5,25 @@ with lib;
|
||||
let
|
||||
cfg = config.home.roles.development;
|
||||
|
||||
# Build beads from flake input
|
||||
# Build beads and gastown from flake inputs using shared package definitions
|
||||
beadsRev = builtins.substring 0 8 (globalInputs.beads.rev or "unknown");
|
||||
|
||||
beadsPackage = pkgs.unstable.buildGoModule {
|
||||
pname = "beads";
|
||||
version = "0.52.0-${beadsRev}";
|
||||
beadsPackage = pkgs.callPackage ../../../packages/beads {
|
||||
src = globalInputs.beads;
|
||||
subPackages = [ "cmd/bd" ];
|
||||
doCheck = false;
|
||||
vendorHash = "sha256-OL6QGf4xSMpEbmU+41pFdO0Rrs3H162T3pdiW9UfWR0=";
|
||||
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
|
||||
# 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-/+ODyndArUF0nJY9r8G5JKhzQckBHFb48A7EBZmoIr0=";
|
||||
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.unstable.buildGoModule {
|
||||
pname = "perles";
|
||||
version = "unstable-${perlesRev}";
|
||||
perlesPackage = pkgs.callPackage ../../../packages/perles {
|
||||
inherit (pkgs.unstable) buildGoModule;
|
||||
src = globalInputs.perles;
|
||||
vendorHash = "sha256-A5LE9Cor/DRcJtVpiScSoqDYhJIKyaq0cbK+OGmr4XU=";
|
||||
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)
|
||||
@@ -132,7 +70,7 @@ in
|
||||
pkgs.unstable.claude-code
|
||||
pkgs.unstable.claude-code-router
|
||||
pkgs.unstable.codex
|
||||
pkgs.dolt
|
||||
pkgs.unstable.dolt
|
||||
pkgs.sqlite
|
||||
|
||||
# Custom packages
|
||||
@@ -146,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
|
||||
@@ -154,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
|
||||
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 ""
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -22,11 +22,12 @@ with lib;
|
||||
sddm = true;
|
||||
wayland = true;
|
||||
};
|
||||
plasma-bigscreen = {
|
||||
kodi = {
|
||||
enable = true;
|
||||
autologin = true;
|
||||
jellyfinScaleFactor = 1.0;
|
||||
wayland = true;
|
||||
appLauncherServer.enable = true;
|
||||
jellyfinScaleFactor = 1.0;
|
||||
};
|
||||
nfs-mounts.enable = true;
|
||||
users.enable = true;
|
||||
@@ -71,3 +72,4 @@ with lib;
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,20 @@
|
||||
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.
|
||||
@@ -61,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; [
|
||||
|
||||
@@ -14,7 +14,7 @@ buildGoModule {
|
||||
inherit version src;
|
||||
subPackages = [ "cmd/bd" ];
|
||||
doCheck = false;
|
||||
vendorHash = "sha256-OL6QGf4xSMpEbmU+41pFdO0Rrs3H162T3pdiW9UfWR0=";
|
||||
vendorHash = "sha256-XAhe4yuLzP9vQ3IFhWAO5fN/3OOfokcRxfeGKaRYEws=";
|
||||
nativeBuildInputs = [ git pkg-config ];
|
||||
buildInputs = [ icu ];
|
||||
meta = with lib; {
|
||||
|
||||
@@ -6,24 +6,24 @@
|
||||
}:
|
||||
|
||||
let
|
||||
version = "2.1.69";
|
||||
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 = "a86e14f44b167c1e8dbf764f76755b92ecf52c097d732a3461fe65b5fb60be05";
|
||||
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 = "e5987b4dd502a6542bf86c3c0bcd1d533b774616fc7d49566ce0b2040e6c1374";
|
||||
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 = "b3bdbd5a3cbf8caafe353022170df77fefa80b00003074d4d27e7da8c59e629a";
|
||||
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 = "ecc7bbf10513ff122327866eb97212945b73afd7f81e30700375cdf10f50b2a3";
|
||||
sha256 = "ec8f4f7f7bb50611dae70c109a76ee1da6a3ab45511c65f117df215848ecc905";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
buildGoModule {
|
||||
pname = "gastown";
|
||||
inherit version src;
|
||||
vendorHash = "sha256-/+ODyndArUF0nJY9r8G5JKhzQckBHFb48A7EBZmoIr0=";
|
||||
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";
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
25
packages/perles/default.nix
Normal file
25
packages/perles/default.nix
Normal 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";
|
||||
};
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
"lockFileMaintenance": {
|
||||
"enabled": true,
|
||||
"schedule": [
|
||||
"after 2pm and before 4pm on Saturday"
|
||||
"after 5pm and before 7pm on Saturday"
|
||||
]
|
||||
},
|
||||
"dependencyDashboard": true,
|
||||
@@ -39,7 +39,7 @@
|
||||
"/^nix-darwin$/"
|
||||
],
|
||||
"schedule": [
|
||||
"after 2pm and before 4pm on Saturday"
|
||||
"after 5pm and before 7pm on Saturday"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -53,7 +53,7 @@
|
||||
"/home-manager-unstable/"
|
||||
],
|
||||
"schedule": [
|
||||
"after 2pm and before 4pm on Saturday"
|
||||
"after 5pm and before 7pm on Saturday"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -65,7 +65,7 @@
|
||||
"/nixpkgs-qt/"
|
||||
],
|
||||
"schedule": [
|
||||
"after 4pm and before 6pm on Saturday"
|
||||
"after 7pm and before 9pm on Saturday"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -12,7 +12,6 @@ with lib;
|
||||
./k3s-node
|
||||
./kodi
|
||||
./nfs-mounts
|
||||
./plasma-bigscreen
|
||||
./nvidia
|
||||
./printing
|
||||
./rclone-mount
|
||||
@@ -20,6 +19,7 @@ with lib;
|
||||
./spotifyd
|
||||
./users
|
||||
./virtualisation
|
||||
./wireguard
|
||||
];
|
||||
|
||||
config = {
|
||||
|
||||
@@ -1,134 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.roles.plasma-bigscreen;
|
||||
|
||||
# Plasma Bigscreen package — not yet in nixpkgs, built from upstream master.
|
||||
# TODO: Replace with pkgs.kdePackages.plasma-bigscreen once available.
|
||||
plasma-bigscreen = pkgs.kdePackages.callPackage ./package.nix {};
|
||||
|
||||
jellyfinMediaPlayerPkg =
|
||||
if cfg.jellyfinScaleFactor != null
|
||||
then pkgs.symlinkJoin {
|
||||
name = "jellyfin-media-player-scaled";
|
||||
paths = [ pkgs.qt-pinned.jellyfin-media-player ];
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
mkdir -p $out/bin
|
||||
rm -f $out/bin/jellyfin-desktop
|
||||
makeWrapper ${pkgs.qt-pinned.jellyfin-media-player}/bin/jellyfin-desktop $out/bin/jellyfin-desktop \
|
||||
--add-flags "--tv --scale-factor ${toString cfg.jellyfinScaleFactor}"
|
||||
|
||||
# Update .desktop file to include scale factor and TV mode arguments
|
||||
mkdir -p $out/share/applications
|
||||
rm -f $out/share/applications/org.jellyfin.JellyfinDesktop.desktop
|
||||
substitute ${pkgs.qt-pinned.jellyfin-media-player}/share/applications/org.jellyfin.JellyfinDesktop.desktop \
|
||||
$out/share/applications/org.jellyfin.JellyfinDesktop.desktop \
|
||||
--replace-fail "Exec=jellyfin-desktop" "Exec=jellyfin-desktop --tv --scale-factor ${toString cfg.jellyfinScaleFactor}"
|
||||
'';
|
||||
}
|
||||
else pkgs.qt-pinned.jellyfin-media-player;
|
||||
in
|
||||
{
|
||||
options.roles.plasma-bigscreen = {
|
||||
enable = mkEnableOption "Plasma Bigscreen TV interface";
|
||||
|
||||
autologin = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Auto-login to Plasma Bigscreen session";
|
||||
};
|
||||
|
||||
user = mkOption {
|
||||
type = types.str;
|
||||
default = "kodi";
|
||||
description = "User account for the Bigscreen session";
|
||||
};
|
||||
|
||||
jellyfinScaleFactor = mkOption {
|
||||
type = types.nullOr types.float;
|
||||
default = null;
|
||||
description = "Scale factor for Jellyfin Media Player UI (e.g., 1.0 for 100% scaling)";
|
||||
};
|
||||
|
||||
appLauncherServer = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enable HTTP app launcher server for remote control";
|
||||
};
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 8081;
|
||||
description = "Port for the app launcher HTTP server";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Create the bigscreen user
|
||||
users.extraUsers.${cfg.user} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" "audio" "video" ];
|
||||
};
|
||||
|
||||
# Plasma Bigscreen is a Plasma 6 shell — needs Plasma 6 desktop manager
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Register the bigscreen session with the display manager
|
||||
services.displayManager = {
|
||||
sessionPackages = [ plasma-bigscreen ];
|
||||
} // optionalAttrs cfg.autologin {
|
||||
autoLogin.enable = true;
|
||||
autoLogin.user = cfg.user;
|
||||
defaultSession = "plasma-bigscreen-wayland";
|
||||
};
|
||||
xdg.portal.configPackages = [ plasma-bigscreen ];
|
||||
|
||||
# Fix homescreen not being focused after quitting app or on boot
|
||||
# xwaylandvideobridge can interfere with focus; exclude if present
|
||||
environment.plasma6.excludePackages =
|
||||
lib.optional (pkgs.kdePackages ? xwaylandvideobridge) pkgs.kdePackages.xwaylandvideobridge;
|
||||
|
||||
# Firewall for remote control
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = optional cfg.appLauncherServer.enable cfg.appLauncherServer.port;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
plasma-bigscreen
|
||||
firefox
|
||||
jellyfinMediaPlayerPkg
|
||||
qt-pinned.stremio
|
||||
wget
|
||||
] ++ optional cfg.appLauncherServer.enable pkgs.custom.app-launcher-server;
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = lib.warn
|
||||
"Allowing insecure package qtwebengine-5.15.19 as a jellyfin-media-player/stremio dependency."
|
||||
[
|
||||
"qtwebengine-5.15.19"
|
||||
];
|
||||
|
||||
programs.kdeconnect.enable = true;
|
||||
|
||||
systemd.user.services = mkIf cfg.appLauncherServer.enable {
|
||||
app-launcher-server = {
|
||||
description = "HTTP App Launcher Server";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
after = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.custom.app-launcher-server}/bin/app-launcher-server ${toString cfg.appLauncherServer.port}";
|
||||
Restart = "always";
|
||||
RestartSec = "5s";
|
||||
Environment = [
|
||||
"PATH=${pkgs.firefox}/bin:/run/current-system/sw/bin"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
# Plasma Bigscreen — TV interface for Plasma 6
|
||||
# Not yet released or packaged in nixpkgs; built from upstream master.
|
||||
#
|
||||
# TODO: Remove this file once plasma-bigscreen lands in nixpkgs.
|
||||
# Tracking issue: https://github.com/NixOS/nixpkgs/issues/428077
|
||||
# Draft nixpkgs PR: https://github.com/NixOS/nixpkgs/pull/428353
|
||||
# When available, switch to pkgs.kdePackages.plasma-bigscreen.
|
||||
#
|
||||
# Upstream: https://invent.kde.org/plasma/plasma-bigscreen
|
||||
{
|
||||
mkKdeDerivation,
|
||||
lib,
|
||||
fetchFromGitLab,
|
||||
pkg-config,
|
||||
# KDE Frameworks 6
|
||||
ki18n,
|
||||
kdeclarative,
|
||||
kcmutils,
|
||||
knotifications,
|
||||
kio,
|
||||
kwayland,
|
||||
kwindowsystem,
|
||||
ksvg,
|
||||
kiconthemes,
|
||||
kglobalaccel,
|
||||
kdbusaddons,
|
||||
# KDE Plasma 6
|
||||
plasma-workspace,
|
||||
plasma-nano,
|
||||
plasma-nm,
|
||||
plasma-activities,
|
||||
plasma-activities-stats,
|
||||
milou,
|
||||
libkscreen,
|
||||
kdeconnect-kde,
|
||||
# Qt 6
|
||||
qtdeclarative, # needed for Qt6::QmlPrivate — see QCoro workaround in postPatch
|
||||
qtmultimedia,
|
||||
qtwebengine,
|
||||
# Other
|
||||
bluez-qt,
|
||||
qcoro,
|
||||
plasma-wayland-protocols,
|
||||
wayland,
|
||||
sdl3,
|
||||
}:
|
||||
|
||||
mkKdeDerivation {
|
||||
pname = "plasma-bigscreen";
|
||||
version = "unstable-2026-03-07";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "invent.kde.org";
|
||||
owner = "plasma";
|
||||
repo = "plasma-bigscreen";
|
||||
rev = "bd143fea7e386bac1652b8150a3ed3d5ef7cf93c";
|
||||
hash = "sha256-y439IX7e0+XqxqFj/4+P5le0hA7DiwA+smDsD0UH/fI=";
|
||||
};
|
||||
|
||||
extraNativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
extraBuildInputs = [
|
||||
# KDE Frameworks
|
||||
ki18n
|
||||
kdeclarative
|
||||
kcmutils
|
||||
knotifications
|
||||
kio
|
||||
kwayland
|
||||
kwindowsystem
|
||||
ksvg
|
||||
kiconthemes
|
||||
kglobalaccel
|
||||
kdbusaddons
|
||||
# Plasma
|
||||
plasma-workspace
|
||||
plasma-nano
|
||||
plasma-nm
|
||||
plasma-activities
|
||||
plasma-activities-stats
|
||||
milou
|
||||
libkscreen
|
||||
kdeconnect-kde
|
||||
# Qt — qtdeclarative is needed for Qt6::QmlPrivate (see postPatch)
|
||||
qtdeclarative
|
||||
qtmultimedia
|
||||
qtwebengine
|
||||
# Other
|
||||
bluez-qt
|
||||
qcoro
|
||||
plasma-wayland-protocols
|
||||
wayland
|
||||
sdl3
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace bin/plasma-bigscreen-wayland.in \
|
||||
--replace @KDE_INSTALL_FULL_LIBEXECDIR@ "${plasma-workspace}/libexec"
|
||||
|
||||
# WORKAROUND: Plasma version numbers must match; we're building an
|
||||
# unreleased package against a stable Plasma release. Remove once
|
||||
# bigscreen is part of the Plasma release cycle.
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail 'set(PROJECT_VERSION "6.5.80")' 'set(PROJECT_VERSION "${plasma-workspace.version}")'
|
||||
|
||||
# WORKAROUND: QCoro6Qml's cmake config links against Qt6::QmlPrivate but
|
||||
# doesn't call find_package to import the target. This is arguably a QCoro
|
||||
# packaging bug in nixpkgs (it should propagate qtdeclarative). Remove
|
||||
# once QCoro or the nixpkgs plasma-bigscreen package is fixed upstream.
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace-fail 'find_package(QCoro6' 'find_package(Qt6 ''${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS QmlPrivate)
|
||||
find_package(QCoro6'
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
wrapQtApp $out/bin/plasma-bigscreen-wayland
|
||||
'';
|
||||
|
||||
passthru.providedSessions = [
|
||||
"plasma-bigscreen-wayland"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Plasma shell for TVs (Plasma Bigscreen)";
|
||||
homepage = "https://plasma-bigscreen.org";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
71
roles/wireguard/default.nix
Normal file
71
roles/wireguard/default.nix
Normal 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" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user