From e29aeab5cd4e3048436e1077aa34379bf1f00d2b Mon Sep 17 00:00:00 2001 From: Timothy Quilling Date: Wed, 23 Sep 2026 01:18:32 -0400 Subject: [PATCH] cleanup --- flake.lock | 172 ++---------------- flake.nix | 4 - .../home-manager/by-category/development.nix | 1 - .../by-category/gui/ghostty-shader-probe.nix | 62 ------- .../by-category/gui/terminal-emulators.nix | 17 +- modules/nixos/by-category/agent.nix | 8 +- modules/nixos/nixcfg.nix | 1 - overlays/default.nix | 35 ---- 8 files changed, 18 insertions(+), 282 deletions(-) delete mode 100644 modules/home-manager/by-category/gui/ghostty-shader-probe.nix diff --git a/flake.lock b/flake.lock index a86c7ca..7d214d8 100644 --- a/flake.lock +++ b/flake.lock @@ -187,22 +187,6 @@ } }, "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_3": { "flake": false, "locked": { "lastModified": 1767039857, @@ -218,7 +202,7 @@ "type": "github" } }, - "flake-compat_4": { + "flake-compat_3": { "flake": false, "locked": { "lastModified": 1751685974, @@ -273,7 +257,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_5" + "systems": "systems_4" }, "locked": { "lastModified": 1731533236, @@ -333,30 +317,6 @@ "type": "github" } }, - "ghostty-pinned": { - "inputs": { - "flake-compat": "flake-compat_2", - "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_2", - "systems": "systems_3", - "zig": "zig_2", - "zon2nix": "zon2nix_2" - }, - "locked": { - "lastModified": 1789271379, - "narHash": "sha256-swmjYSYTZRDjlzYreBCNkt28bgU8pZcXiO6UF+On+Ts=", - "owner": "ghostty-org", - "repo": "ghostty", - "rev": "5252b193cfd52b4bcd868135e21e4563f2f326ec", - "type": "github" - }, - "original": { - "owner": "ghostty-org", - "repo": "ghostty", - "rev": "5252b193cfd52b4bcd868135e21e4563f2f326ec", - "type": "github" - } - }, "gomod2nix": { "inputs": { "flake-utils": "flake-utils", @@ -413,27 +373,6 @@ } }, "home-manager_2": { - "inputs": { - "nixpkgs": [ - "ghostty-pinned", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1787661347, - "narHash": "sha256-THmnBAdAIV+jT348f3r/vyoeb6ilhcVLwVXkBU7Pai8=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "52c3a5881c821ad7367bbde075e52b76cdb378ab", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_3": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -453,7 +392,7 @@ "type": "github" } }, - "home-manager_4": { + "home-manager_3": { "inputs": { "nixpkgs": [ "impermanence", @@ -513,7 +452,7 @@ }, "impermanence": { "inputs": { - "home-manager": "home-manager_4", + "home-manager": "home-manager_3", "nixpkgs": [ "nixpkgs" ] @@ -565,8 +504,8 @@ "inputs": { "bun2nix": "bun2nix", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_3", - "systems": "systems_4", + "nixpkgs": "nixpkgs_2", + "systems": "systems_3", "treefmt-nix": "treefmt-nix" }, "locked": { @@ -644,9 +583,9 @@ }, "nix-cachyos-kernel": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1789241994, @@ -748,19 +687,6 @@ } }, "nixpkgs_2": { - "locked": { - "lastModified": 1787424095, - "narHash": "sha256-SpMiSe9OSfWseGAupsdcED3He9mTYTbGMtWb7EVt6pE=", - "rev": "174eb786fb68e3a13e4e535a3deea479a0c07a6a", - "type": "tarball", - "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1059855.174eb786fb68/nixexprs.tar.zst" - }, - "original": { - "type": "tarball", - "url": "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.zst" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1789960332, "narHash": "sha256-MQ5my6vvo0z2iVQcKqrysutFWvsNw3/ynNxzjJon4yc=", @@ -776,7 +702,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { "lastModified": 1789181251, "narHash": "sha256-8yaO1XLoObzYgb6Uj+0IkUxbkCI6kBLuImoZAuAHzB4=", @@ -792,7 +718,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1789921291, "narHash": "sha256-Ft/BRnIqw1MywFoXydKobjjWmDFgDdYtSpJliE8+yUw=", @@ -808,7 +734,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_5": { "locked": { "lastModified": 1784176690, "narHash": "sha256-UCyrwrMqHxfvgEJBdqVUYg18mjf+HZtT+A5AxWNEmu8=", @@ -874,15 +800,14 @@ "disko": "disko", "foundryvtt": "foundryvtt", "ghostty": "ghostty", - "ghostty-pinned": "ghostty-pinned", - "home-manager": "home-manager_3", + "home-manager": "home-manager_2", "impermanence": "impermanence", "llm-agents": "llm-agents", "nix-cachyos-kernel": "nix-cachyos-kernel", "nix-flatpak": "nix-flatpak", "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "plasma-manager": "plasma-manager", "ratlogin": "ratlogin", "tangled-core": "tangled-core", @@ -990,7 +915,6 @@ } }, "systems_3": { - "flake": false, "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -1020,21 +944,6 @@ "type": "github" } }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tailwindcss-animated-src": { "flake": false, "locked": { @@ -1053,7 +962,7 @@ "actor-typeahead-src": "actor-typeahead-src", "fenix": "fenix", "fetch-tangled": "fetch-tangled", - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_3", "gomod2nix": "gomod2nix", "hls-src": "hls-src", "htmx-src": "htmx-src", @@ -1109,7 +1018,7 @@ }, "tranquil_2": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1790001714, @@ -1210,35 +1119,6 @@ "type": "github" } }, - "zig_2": { - "inputs": { - "flake-compat": [ - "ghostty-pinned", - "flake-compat" - ], - "nixpkgs": [ - "ghostty-pinned", - "nixpkgs" - ], - "systems": [ - "ghostty-pinned", - "systems" - ] - }, - "locked": { - "lastModified": 1787617283, - "narHash": "sha256-jiM1glpDL5ASrqvcWyacI+c1wZo3g6AUhdo6M09AoiY=", - "owner": "mitchellh", - "repo": "zig-overlay", - "rev": "da55b9fe9260fb3eb1456c3ee6064b8f738e4ba9", - "type": "github" - }, - "original": { - "owner": "mitchellh", - "repo": "zig-overlay", - "type": "github" - } - }, "zon2nix": { "inputs": { "nixpkgs": [ @@ -1260,28 +1140,6 @@ "repo": "zon2nix", "type": "github" } - }, - "zon2nix_2": { - "inputs": { - "nixpkgs": [ - "ghostty-pinned", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1784080626, - "narHash": "sha256-Hvnmnuu0VpHiZl+8z+UkMoxC7JZJvRYBqu2Asb0ZJOE=", - "owner": "jcollie", - "repo": "zon2nix", - "rev": "776b5f6864a607c141d7966421b433fa1657ba9a", - "type": "github" - }, - "original": { - "owner": "jcollie", - "ref": "main", - "repo": "zon2nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c8bbc92..79b6af2 100644 --- a/flake.nix +++ b/flake.nix @@ -33,9 +33,6 @@ The starlight on the Western Seas. ghostty = { url = "github:ghostty-org/ghostty?ref=refs/tags/tip"; }; - ghostty-pinned = { - url = "github:ghostty-org/ghostty/5252b193cfd52b4bcd868135e21e4563f2f326ec"; - }; llm-agents.url = "github:numtide/llm-agents.nix"; vpn-confinement.url = "github:Maroka-chan/VPN-Confinement"; @@ -94,7 +91,6 @@ The starlight on the Western Seas. config.allowUnfree = true; overlays = [ self.overlays.llm-agents - self.overlays.prime-agent-tweaks ]; } ); diff --git a/modules/home-manager/by-category/development.nix b/modules/home-manager/by-category/development.nix index 16088d2..c171c36 100644 --- a/modules/home-manager/by-category/development.nix +++ b/modules/home-manager/by-category/development.nix @@ -16,7 +16,6 @@ in with pkgs; lib.optionals (desktop && !agentEnabled) [ llm-agents.claude-code - llm-agents.prime-agent llm-agents.codex ] ++ [ diff --git a/modules/home-manager/by-category/gui/ghostty-shader-probe.nix b/modules/home-manager/by-category/gui/ghostty-shader-probe.nix deleted file mode 100644 index 45de561..0000000 --- a/modules/home-manager/by-category/gui/ghostty-shader-probe.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ - runCommand, - weston, - mesa, - makeFontsConf, - dejavu_fonts, - coreutils, - gnugrep, - ghostty, -}: -runCommand "ghostty-shader-probe-${ghostty.version}" - { - nativeBuildInputs = [ - weston - coreutils - gnugrep - ]; - FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ dejavu_fonts ]; }; - __EGL_VENDOR_LIBRARY_FILENAMES = "${mesa}/share/glvnd/egl_vendor.d/50_mesa.json"; - LIBGL_DRIVERS_PATH = "${mesa}/lib/dri"; - LIBGL_ALWAYS_SOFTWARE = "1"; - EGL_PLATFORM = "wayland"; - GDK_BACKEND = "wayland"; - } - '' - export HOME=$TMPDIR/home XDG_RUNTIME_DIR=$TMPDIR/run - mkdir -p $HOME $XDG_RUNTIME_DIR - chmod 700 $XDG_RUNTIME_DIR - - cat > shader.glsl <<'EOF' - void mainImage(out vec4 fragColor, in vec2 fragCoord) - { - fragColor = vec4(1.0, 0.0, 0.0, 1.0); - } - EOF - - weston --backend=headless --renderer=pixman --socket=probe \ - --width=640 --height=480 --idle-time=0 >weston.log 2>&1 & - for _ in $(seq 50); do - [ -S $XDG_RUNTIME_DIR/probe ] && break - sleep 0.1 - done - export WAYLAND_DISPLAY=probe - - timeout 10 ${ghostty}/bin/ghostty \ - --config-default-files=false \ - --gtk-single-instance=false \ - --custom-shader=$PWD/shader.glsl \ - -e sh -c 'sleep 5' >ghostty.log 2>&1 || true - kill %1 || true - - if ! grep -q 'started subcommand' ghostty.log; then - result=inconclusive - elif grep -q 'error drawing' ghostty.log; then - result=broken - else - result=fixed - fi - echo "probe result: $result" - [ $result = inconclusive ] && cat weston.log ghostty.log - printf %s $result > $out - '' diff --git a/modules/home-manager/by-category/gui/terminal-emulators.nix b/modules/home-manager/by-category/gui/terminal-emulators.nix index 066f68b..e1a7f2a 100644 --- a/modules/home-manager/by-category/gui/terminal-emulators.nix +++ b/modules/home-manager/by-category/gui/terminal-emulators.nix @@ -1,28 +1,13 @@ { lib, - pkgs, config, inputs, ... }: -let - ghostty-tip = inputs.ghostty.packages.x86_64-linux.default; - ghostty-pinned = inputs.ghostty-pinned.packages.x86_64-linux.default; - - probe = lib.fileContents (pkgs.callPackage ./ghostty-shader-probe.nix { ghostty = ghostty-tip; }); - - ghostty = - if probe == "fixed" then - lib.warn "ghostty tip (${ghostty-tip.version}) passes the custom-shader probe; drop the ghostty-pinned input and the probe from terminal-emulators.nix" ghostty-tip - else if probe == "broken" then - ghostty-pinned - else - lib.warn "ghostty custom-shader probe was inconclusive for ${ghostty-tip.version}; keeping ghostty-pinned" ghostty-pinned; -in { config = lib.mkIf config.teq.home-manager.gui { home.packages = [ - (lib.hiPrio ghostty) + (lib.hiPrio inputs.ghostty.packages.x86_64-linux.default) ]; }; } diff --git a/modules/nixos/by-category/agent.nix b/modules/nixos/by-category/agent.nix index 621d046..4b8addb 100644 --- a/modules/nixos/by-category/agent.nix +++ b/modules/nixos/by-category/agent.nix @@ -321,7 +321,6 @@ in default = [ "claude" "codex" - "prime-agent" ]; description = "Binary names wrapped so they run as `agent`; each must exist in the agent's per-user profile."; }; @@ -330,7 +329,6 @@ in default = with pkgs.llm-agents; [ claude-code codex - prime-agent ]; description = "Packages installed into the agent's profile."; }; @@ -451,8 +449,7 @@ in agentSecret "gh-agent" (secretsDir + "/gh-agent.age") ) // fleetSecret "claude-agent" - // fleetSecret "codex-auth" - // fleetSecret "prime-auth"; + // fleetSecret "codex-auth"; }) { assertions = [ @@ -542,7 +539,7 @@ in }; script = '' set -eu - install -d -m 0750 -o agent -g agents ${agentHome}/.codex ${agentHome}/.prime ${agentHome}/.prime/agent + install -d -m 0750 -o agent -g agents ${agentHome}/.codex seed() { if [ -r "$1" ] && [ ! -e "$2" ]; then ${pkgs.jq}/bin/jq -e . "$1" >/dev/null @@ -551,7 +548,6 @@ in fi } seed /run/agenix/codex-auth ${agentHome}/.codex/auth.json - seed /run/agenix/prime-auth ${agentHome}/.prime/agent/auth.json ''; }; diff --git a/modules/nixos/nixcfg.nix b/modules/nixos/nixcfg.nix index 8bd7d62..1ae929f 100644 --- a/modules/nixos/nixcfg.nix +++ b/modules/nixos/nixcfg.nix @@ -77,7 +77,6 @@ in overlays = [ outputs.overlays.modifications outputs.overlays.llm-agents - outputs.overlays.prime-agent-tweaks ]; }; nix = { diff --git a/overlays/default.nix b/overlays/default.nix index d714ebf..21fa8b5 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -17,39 +17,4 @@ patches = builtins.filter builtins.isPath old.patches; }); }; - - prime-agent-tweaks = final: prev: { - llm-agents = prev.llm-agents // { - prime-agent = - let - unpatched = prev.llm-agents.prime-agent; - in - final.runCommand unpatched.name - { - inherit (unpatched) meta; - passthru = unpatched.passthru or { }; - } - '' - cp -r ${unpatched} $out - chmod -R u+w $out - shopt -s globstar - hits=0 - for f in $out/lib/prime-agent/packages/coding-agent/dist/**/*.js; do - if grep -qF 'return START_HINTS[' "$f"; then - substituteInPlace "$f" --replace-fail \ - 'return START_HINTS[Math.floor(random() * START_HINTS.length)] ?? START_HINTS[0];' \ - 'return "";' - hits=$((hits + 1)) - fi - done - if [ "$hits" -lt 1 ]; then - echo "prime-agent-tweaks: START_HINTS pattern not found; upstream changed?" >&2 - exit 1 - fi - for f in $out/bin/*; do - sed -i "s|${unpatched}|$out|g" "$f" - done - ''; - }; - }; } -- 2.51.2