diff --git a/flake.lock b/flake.lock index 72e94cc..4015d29 100644 --- a/flake.lock +++ b/flake.lock @@ -2,19 +2,16 @@ "nodes": { "agenix": { "inputs": { - "darwin": "darwin", - "home-manager": "home-manager", "nixpkgs": [ "nixpkgs" - ], - "systems": "systems" + ] }, "locked": { - "lastModified": 1770165109, - "narHash": "sha256-9VnK6Oqai65puVJ4WYtCTvlJeXxMzAp/69HhQuTdl/I=", + "lastModified": 1790734419, + "narHash": "sha256-n7wew722m1OTBT9DOIMxNX/NF4zfsSUABAO5eW3wikE=", "owner": "ryantm", "repo": "agenix", - "rev": "b027ee29d959fda4b60b57566d64c98a202e0feb", + "rev": "3daa710894355fa2fad8243380af373a2b4046ef", "type": "github" }, "original": { @@ -25,11 +22,11 @@ }, "amp-pkgs": { "locked": { - "lastModified": 1788953386, - "narHash": "sha256-dIqD4NX3Uldk29CBqKt9dRdSxh/+Ba8lVPu2xEsLTJo=", + "lastModified": 1791191277, + "narHash": "sha256-i8KuaINOYLvB2oQikGvtRmdZRxATRxsI9Yad2pp7dEA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "19a27817106f9449970edb3a398ab5349666466f", + "rev": "aa48d347080940b8a2b8d2f48228674e280a3514", "type": "github" }, "original": { @@ -42,14 +39,14 @@ "claude-code": { "inputs": { "nixpkgs": "nixpkgs", - "systems": "systems_2" + "systems": "systems" }, "locked": { - "lastModified": 1788987690, - "narHash": "sha256-/TSj85TBwXmytliESwnhHrlFAIw2pwSOgAmI0MNCGQk=", + "lastModified": 1791259350, + "narHash": "sha256-zFzAgJWwGylQEnlX3wC/j2sVjMRCVnYNn8ogLDF7JGc=", "owner": "sadjow", "repo": "claude-code-nix", - "rev": "72091e21c74c14ccb6554a76e4416608039b289d", + "rev": "05717477d9464707396b6387ae401175450173d6", "type": "github" }, "original": { @@ -58,28 +55,6 @@ "type": "github" } }, - "darwin": { - "inputs": { - "nixpkgs": [ - "agenix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1744478979, - "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "43975d782b418ebf4969e9ccba82466728c2851b", - "type": "github" - }, - "original": { - "owner": "lnl7", - "ref": "master", - "repo": "nix-darwin", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -103,7 +78,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1731533236, @@ -122,7 +97,7 @@ "hermes-agent": { "inputs": { "flake-parts": "flake-parts", - "home-manager": "home-manager_2", + "home-manager": "home-manager", "nixpkgs": "nixpkgs_2", "npm-lockfile-fix": "npm-lockfile-fix", "pyproject-build-systems": "pyproject-build-systems", @@ -130,11 +105,11 @@ "uv2nix": "uv2nix" }, "locked": { - "lastModified": 1789361774, - "narHash": "sha256-ashkMxyQelHq7T4AcJ0Zwuzm9/jMR3hTCWW+2FPwlDg=", + "lastModified": 1791259737, + "narHash": "sha256-/uzjAiGOX1NmrPYiyOmy4fM8v2CDC0QHPuYXrMv2/9Y=", "owner": "NousResearch", "repo": "hermes-agent", - "rev": "5eb99eb2844b22ebb723711b8e6a0bbb80bb5f04", + "rev": "a036b13793a2275a71617d4e9bc2b7a78b2be42d", "type": "github" }, "original": { @@ -144,27 +119,6 @@ } }, "home-manager": { - "inputs": { - "nixpkgs": [ - "agenix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1745494811, - "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "home-manager_2": { "inputs": { "nixpkgs": [ "hermes-agent", @@ -185,18 +139,18 @@ "type": "github" } }, - "home-manager_3": { + "home-manager_2": { "inputs": { "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1788642154, - "narHash": "sha256-sPpQFVaFTDqO/4vvCAhuAhqTgqN/ygu+9eJcs5eB0js=", + "lastModified": 1790996401, + "narHash": "sha256-f+kOxEmOUnQazVAmGg0i8hzwgd1kX/geY+k/Dpheye8=", "owner": "nix-community", "repo": "home-manager", - "rev": "fd0956c99c41ae3c13a73a638f1f7e963aebc4ab", + "rev": "db7d5e2332710f5abb088f6b5de927d7f9511b35", "type": "github" }, "original": { @@ -228,11 +182,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1788922888, - "narHash": "sha256-QMX3uerxnW2R5dHcWpIQILHDltOZnon3x3Spq7EzBFI=", + "lastModified": 1791191277, + "narHash": "sha256-i8KuaINOYLvB2oQikGvtRmdZRxATRxsI9Yad2pp7dEA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a391f95d4557d685fd8e5dc0d4b1f9271aa2f342", + "rev": "aa48d347080940b8a2b8d2f48228674e280a3514", "type": "github" }, "original": { @@ -260,11 +214,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1788953386, - "narHash": "sha256-dIqD4NX3Uldk29CBqKt9dRdSxh/+Ba8lVPu2xEsLTJo=", + "lastModified": 1791191277, + "narHash": "sha256-i8KuaINOYLvB2oQikGvtRmdZRxATRxsI9Yad2pp7dEA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "19a27817106f9449970edb3a398ab5349666466f", + "rev": "aa48d347080940b8a2b8d2f48228674e280a3514", "type": "github" }, "original": { @@ -292,11 +246,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1788953386, - "narHash": "sha256-dIqD4NX3Uldk29CBqKt9dRdSxh/+Ba8lVPu2xEsLTJo=", + "lastModified": 1791191277, + "narHash": "sha256-i8KuaINOYLvB2oQikGvtRmdZRxATRxsI9Yad2pp7dEA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "19a27817106f9449970edb3a398ab5349666466f", + "rev": "aa48d347080940b8a2b8d2f48228674e280a3514", "type": "github" }, "original": { @@ -308,11 +262,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1788921488, - "narHash": "sha256-8+xWRxEkD6l217cIUdRxfeUGS9lQX0hVtUuNVsBaDzk=", + "lastModified": 1791143449, + "narHash": "sha256-9+n3ReS2y9xS199LoJjKUWHwZrISGHWgkD/LUZTDZyA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "6aefcda9401be8acc2b74244fb3b37520ea1f0a8", + "rev": "0d9e9b832d03ac387417e16ce1febf73b2e631e1", "type": "github" }, "original": { @@ -399,7 +353,7 @@ "amp-pkgs": "amp-pkgs", "claude-code": "claude-code", "hermes-agent": "hermes-agent", - "home-manager": "home-manager_3", + "home-manager": "home-manager_2", "k": "k", "nixpkgs": "nixpkgs_4", "nixpkgs-ccextractor": "nixpkgs-ccextractor", @@ -408,11 +362,11 @@ }, "systems": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1791244623, + "narHash": "sha256-uuanbkFk8a313Zfrxdcz8Us/yQtaxNnKJtX8v0ZPpd8=", "owner": "nix-systems", "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "rev": "d36eeed142f88b5a636f2e3856a53c61654cf29b", "type": "github" }, "original": { @@ -436,21 +390,6 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "uv2nix": { "inputs": { "nixpkgs": [ diff --git a/home.nix b/home.nix index 24c5682..10db26b 100644 --- a/home.nix +++ b/home.nix @@ -7,6 +7,8 @@ programs.gpg.enable = true; + services.syncthing.enable = true; + services.gpg-agent = { enable = true; enableZshIntegration = true; @@ -54,13 +56,16 @@ # nix hash convert --hash-algo sha256 --to sri ] ++ (let - mkOmnictl = pkgs.callPackage ./pkgs/omnictl.nix {}; + mkOmnictl = pkgs.callPackage ./pkgs/omnictl.nix {}; mkTalosctl = pkgs.callPackage ./pkgs/talosctl.nix {}; + mkMecatl = pkgs.callPackage ./pkgs/mecatl.nix {}; in [ (mkOmnictl { version = "1.11.0"; hash = "sha256-NY6LEC/adcmkKYrGcgN5J2uxnJ2o/fD+ekkDQrTqF1Q="; isLatest = true; }) (mkOmnictl { version = "1.10.6"; hash = "sha256-LxktbxHTIJSJ30+naAdKyBpLfpf5C9bszafJPr1F/7A="; }) (mkTalosctl { version = "1.14.0"; hash = "sha256-LBR8SpnRJMlb1cGQ/gVOCzyTSV8iQ/1lLr1COtuDd8c="; isLatest = true; }) (mkTalosctl { version = "1.13.10"; hash = "sha256-KOnM2a69aQ+gPYzyWCIh2H6jiyoXBPQR11oDWJxY8qo="; }) + (mkMecatl { version = "0.0.38"; hash = "sha256-AsnHlNgMZsS/wVe2pJGlKYToYfMDSlas4092/CR+w24="; }) + (pkgs.callPackage ./pkgs/ocr.nix {}) # Packages that need custom expressions (pkgs.google-cloud-sdk.withExtraComponents [ pkgs.google-cloud-sdk.components.gke-gcloud-auth-plugin ]) (let @@ -184,6 +189,15 @@ EOF # AppImage launchers — wrap with `appimage-run` so they get the required FHS libs. # AppImages live in ~/.local/share/AppImages/.AppImage (XDG-compliant, hidden). # Use versionless filenames so updates overwrite the same file with no config edit. + xdg.desktopEntries.syncthing = { + name = "Syncthing"; + exec = "xdg-open http://127.0.0.1:8384"; + icon = "syncthing"; + type = "Application"; + categories = [ "Network" ]; + comment = "Open Syncthing web UI"; + }; + xdg.desktopEntries.beeper = { name = "Beeper"; exec = "appimage-run ${config.xdg.dataHome}/AppImages/beeper.AppImage %U"; diff --git a/pkgs/mecatl.nix b/pkgs/mecatl.nix new file mode 100644 index 0000000..9bdceba --- /dev/null +++ b/pkgs/mecatl.nix @@ -0,0 +1,36 @@ +{ lib, fetchurl, stdenv }: + +{ version, hash }: + +let + arch = if stdenv.hostPlatform.isAarch64 then "arm64" else "amd64"; +in + +stdenv.mkDerivation { + pname = "mecatl"; + inherit version; + + src = fetchurl { + url = "https://github.com/stacklok/mecatl/releases/download/v${version}/mecatl_${version}_linux_${arch}.tar.gz"; + inherit hash; + }; + + sourceRoot = "."; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + mkdir -p $out/bin + install -m755 mecated $out/bin/mecated + install -m755 mecatui $out/bin/mecatui + ''; + + meta = with lib; { + description = "Cloud-native agent harness for running AI agents as production workloads"; + homepage = "https://github.com/stacklok/mecatl"; + license = licenses.asl20; + platforms = [ "x86_64-linux" "aarch64-linux" ]; + mainProgram = "mecated"; + }; +} diff --git a/pkgs/ocr.nix b/pkgs/ocr.nix new file mode 100644 index 0000000..455dcb5 --- /dev/null +++ b/pkgs/ocr.nix @@ -0,0 +1,43 @@ +{ stdenv, lib, fetchurl }: + +let + # Native binary comes from a per-platform npm sub-package. Map each Nix + # system to {pkg suffix, SRI hash}. Bumping `version` below usually just + # needs new hashes for the platforms you build on — see the header comment + # in home.nix for how to refresh them. + sources = { + "x86_64-linux" = { suffix = "linux-x64"; hash = "sha256-bT9gBLsGLkGLrE7OHHLp7OwrFewGrXv7etenyKyD1S4="; }; + "aarch64-linux" = { suffix = "linux-arm64"; hash = lib.fakeHash; }; + "x86_64-darwin" = { suffix = "darwin-x64"; hash = lib.fakeHash; }; + "aarch64-darwin"= { suffix = "darwin-arm64"; hash = lib.fakeHash; }; + }; + source = sources.${stdenv.hostPlatform.system} + or (throw "open-code-review: unsupported system ${stdenv.hostPlatform.system}"); +in +stdenv.mkDerivation (finalAttrs: { + pname = "open-code-review"; + version = "1.12.12"; + + src = fetchurl { + url = "https://registry.npmjs.org/@alibaba-group/ocr-${source.suffix}/-/ocr-${source.suffix}-${finalAttrs.version}.tgz"; + hash = source.hash; + }; + + dontConfigure = true; + dontBuild = true; + dontStrip = true; + + installPhase = '' + runHook preInstall + install -Dm755 bin/opencodereview $out/bin/ocr + runHook postInstall + ''; + + meta = with lib; { + description = "AI-powered code review CLI (Alibaba Open Code Review)"; + homepage = "https://open-codereview.ai"; + license = licenses.asl20; + mainProgram = "ocr"; + platforms = builtins.attrNames sources; + }; +}) diff --git a/pkgs/snaptext.nix b/pkgs/snaptext.nix index 8173452..d38302d 100644 --- a/pkgs/snaptext.nix +++ b/pkgs/snaptext.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchFromGitHub, glib, gettext }: +{ stdenv, lib, fetchFromGitHub, glib, gettext, jq }: stdenv.mkDerivation rec { pname = "gnome-shell-extension-snaptext"; @@ -12,12 +12,14 @@ stdenv.mkDerivation rec { hash = "sha256-L1nW3Jzck7yRnIjI0YLV1Z3YFUBVNuo5Sgd/ZoWEUlY="; }; - nativeBuildInputs = [ glib gettext ]; + nativeBuildInputs = [ glib gettext jq ]; dontConfigure = true; buildPhase = '' runHook preBuild + # GNOME 45+ requires an integer "version" field in metadata.json + jq '. + {"version": 1}' metadata.json > metadata.json.tmp && mv metadata.json.tmp metadata.json glib-compile-schemas --strict schemas/ if [ -d po ]; then for po_file in po/*.po; do