From 9b582bec7b96bfd86951e61b6779edb6d39cb930 Mon Sep 17 00:00:00 2001 From: Jack O'Sullivan Date: Sun, 26 Jul 2026 18:55:20 +0100 Subject: [PATCH] home-manager/gui: Add pi-coding-agent --- flake.lock | 134 ++++++++++++++++++++++++++- flake.nix | 2 + home-manager/modules/common.nix | 4 + home-manager/modules/gui/default.nix | 11 +++ nixos/modules/common.nix | 1 + 5 files changed, 148 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index 535b672..a1df736 100644 --- a/flake.lock +++ b/flake.lock @@ -8,7 +8,7 @@ "ragenix", "nixpkgs" ], - "systems": "systems_7" + "systems": "systems_8" }, "locked": { "lastModified": 1761656077, @@ -67,6 +67,34 @@ "type": "github" } }, + "bun2nix": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": [ + "pi-agent", + "nixpkgs" + ], + "systems": [ + "pi-agent", + "systems" + ], + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1778446047, + "narHash": "sha256-oQvcadh2BCkrog+SGrG6YffKJrveYpjj3TdQJWaKhaM=", + "owner": "nix-community", + "repo": "bun2nix", + "rev": "f2bc12af1a6369648aac41041ceeaa0b866599c6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "2.1.0", + "repo": "bun2nix", + "type": "github" + } + }, "copyparty": { "inputs": { "flake-utils": "flake-utils_5", @@ -256,6 +284,28 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "pi-agent", + "bun2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1777988971, + "narHash": "sha256-qIoWPDs+0/8JecyYgE3gpKQxW/4bLW/gp45vow9ioCQ=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "0678d8986be1661af6bb555f3489f2fdfc31f6ff", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -276,7 +326,7 @@ }, "flake-utils_10": { "inputs": { - "systems": "systems_9" + "systems": "systems_10" }, "locked": { "lastModified": 1709126324, @@ -294,7 +344,7 @@ }, "flake-utils_11": { "inputs": { - "systems": "systems_10" + "systems": "systems_11" }, "locked": { "lastModified": 1705309234, @@ -444,7 +494,7 @@ }, "flake-utils_9": { "inputs": { - "systems": "systems_8" + "systems": "systems_9" }, "locked": { "lastModified": 1731533236, @@ -586,6 +636,21 @@ "type": "github" } }, + "jail-nix": { + "locked": { + "lastModified": 1776230864, + "narHash": "sha256-YsEjjdOsGEzTeD+iT7ONh071BqWAOQWpzYVei3okAXE=", + "owner": "~alexdavid", + "repo": "jail.nix", + "rev": "404e7da9da5ab9aa643666682b2ba1312fa5fbe8", + "type": "sourcehut" + }, + "original": { + "owner": "~alexdavid", + "repo": "jail.nix", + "type": "sourcehut" + } + }, "libnetRepo": { "flake": false, "locked": { @@ -795,6 +860,29 @@ "type": "github" } }, + "pi-agent": { + "inputs": { + "bun2nix": "bun2nix", + "jail-nix": "jail-nix", + "nixpkgs": [ + "nixpkgs-unstable" + ], + "systems": "systems_7" + }, + "locked": { + "lastModified": 1784984457, + "narHash": "sha256-y7jv+RTP0TkcJaDm7/D2xIFF9JDWKc6g5L3X3EUu3Eo=", + "owner": "lukasl-dev", + "repo": "pi.nix", + "rev": "fd2c62853f66a5803dae621769570f1165e59b80", + "type": "github" + }, + "original": { + "owner": "lukasl-dev", + "repo": "pi.nix", + "type": "github" + } + }, "pyproject-nix": { "inputs": { "nixpkgs": [ @@ -860,6 +948,7 @@ "nixpkgs-mine-stable": "nixpkgs-mine-stable", "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-unstable": "nixpkgs-unstable", + "pi-agent": "pi-agent", "ragenix": "ragenix", "sharry": "sharry" } @@ -957,6 +1046,21 @@ "type": "github" } }, + "systems_11": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "systems_2": { "locked": { "lastModified": 1681028828, @@ -1098,6 +1202,28 @@ "type": "github" } }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "pi-agent", + "bun2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1775636079, + "narHash": "sha256-pc20NRoMdiar8oPQceQT47UUZMBTiMdUuWrYu2obUP0=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "790751ff7fd3801feeaf96d7dc416a8d581265ba", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "utils": { "inputs": { "systems": "systems_3" diff --git a/flake.nix b/flake.nix index a429d36..f3afe7c 100644 --- a/flake.nix +++ b/flake.nix @@ -49,6 +49,8 @@ copyparty.inputs.nixpkgs.follows = "nixpkgs-unstable"; hass-west-wood.url = "github:devplayer0/hass-west-wood"; hass-west-wood.inputs.nixpkgs.follows = "nixpkgs-unstable"; + pi-agent.url = "github:lukasl-dev/pi.nix"; + pi-agent.inputs.nixpkgs.follows = "nixpkgs-unstable"; }; outputs = diff --git a/home-manager/modules/common.nix b/home-manager/modules/common.nix index 576a3eb..eebc1ac 100644 --- a/home-manager/modules/common.nix +++ b/home-manager/modules/common.nix @@ -8,6 +8,8 @@ let inherit (lib.my) mkOpt' dummyOption; in { + imports = [ inputs.pi-agent.homeModules.default ]; + options = with lib.types; { my = { isStandalone = mkOption { @@ -27,6 +29,7 @@ in }; }; }; + config = mkMerge [ { my = { @@ -229,6 +232,7 @@ in inputs.deploy-rs.overlays.default inputs.boardie.overlays.default inputs.nixGL.overlays.default + inputs.pi-agent.overlays.default ]; config = { allowUnfree = true; diff --git a/home-manager/modules/gui/default.nix b/home-manager/modules/gui/default.nix index 6f9cf6c..381ce94 100644 --- a/home-manager/modules/gui/default.nix +++ b/home-manager/modules/gui/default.nix @@ -87,6 +87,17 @@ in ffmpeg-full xournalpp + + (pkgs.symlinkJoin { + name = "pi-coding-agent"; + buildInputs = [ pkgs.makeWrapper ]; + paths = [ pkgs.pi-coding-agent-bun ]; + postBuild = '' + wrapProgram $out/bin/pi \ + --set NPM_CONFIG_PREFIX ${config.home.homeDirectory}/.pi/npm/ \ + --prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.nodejs_latest ]} + ''; + }) ]; }; diff --git a/nixos/modules/common.nix b/nixos/modules/common.nix index 47a5cec..5a964a7 100644 --- a/nixos/modules/common.nix +++ b/nixos/modules/common.nix @@ -83,6 +83,7 @@ in inputs.boardie.overlays.default inputs.copyparty.overlays.default inputs.hass-west-wood.overlays.default + inputs.pi-agent.overlays.default ]; config = { allowUnfree = true;