Compare commits

..

8 commits

Author SHA1 Message Date
eda6d62b95 fixed fzf.nvim retarded tab default 2026-04-30 17:00:03 -04:00
9235442782 updated submodules 2026-04-30 16:45:40 -04:00
45a648642b fix(neovim): point submodule at upstream commit 2026-04-30 13:36:39 -04:00
05d7694fa6 fix(neovim): let mason own lsp tools 2026-04-30 13:16:27 -04:00
42c9fbc6e1 fix(neovim): support mason tools on nixos 2026-04-30 11:01:06 -04:00
a184bd35ee remove opencode 2026-04-27 17:26:00 -04:00
9aa7b21828 bump pi config submodule 2026-04-27 17:22:08 -04:00
1ca2e5a512 add pi coding agent module
Manages `~/.pi/agent` config via the itme-brain/pi submodule and
provides nodejs_20 with NPM_CONFIG_PREFIX=~/.npm-global so pi and its
extensions install via the global npm ecosystem.

Pi itself and extensions like pi-mcp-adapter are installed manually
via `npm install -g` rather than packaged through nix — the ecosystem
moves too fast to keep derivations current.
2026-04-27 16:55:26 -04:00
16 changed files with 101 additions and 128 deletions

42
flake.lock generated
View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1776613567, "lastModified": 1773025010,
"narHash": "sha256-gC9Cp5ibBmGD5awCA9z7xy6MW6iJufhazTYJOiGlCUI=", "narHash": "sha256-khlHllTsovXgT2GZ0WxT4+RvuMjNeR5OW0UYeEHPYQo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "32f4236bfc141ae930b5ba2fb604f561fed5219d", "rev": "7b9f7f88ab3b339f8142dc246445abb3c370d3d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -64,11 +64,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775425411, "lastModified": 1772985280,
"narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=", "narHash": "sha256-FdrNykOoY9VStevU4zjSUdvsL9SzJTcXt4omdEDZDLk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe", "rev": "8f736f007139d7f70752657dff6a401a585d6cbc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -102,11 +102,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1777428379, "lastModified": 1773375660,
"narHash": "sha256-ypxFOeDz+CqADEQNL72haqGjvZQdBR5Vc7pyx2JDttI=", "narHash": "sha256-SEzUWw2Rf5Ki3bcM26nSKgbeoqi2uYy8IHVBqOKjX3w=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "755f5aa91337890c432639c60b6064bb7fe67769", "rev": "3e20095fe3c6cbb1ddcef89b26969a69a1570776",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -118,11 +118,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1777268161, "lastModified": 1776169885,
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=", "narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76", "rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -134,11 +134,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1777268161, "lastModified": 1772963539,
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=", "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76", "rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -154,11 +154,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1777603930, "lastModified": 1773108757,
"narHash": "sha256-IkawcGZuNSlf7mkiGo6NgmZir248sd6mVvUj1kuPIMw=", "narHash": "sha256-3BAoe2R6YA6Xjdsgx3urZ4Ns3LeTy0E/w5d1wPny910=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "e7e4dc38580b7ef29d36d4afd3ba808e4f7ef5d5", "rev": "9f2c583704f122828e6f9893416ca3b007464ee6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -185,11 +185,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1777338324, "lastModified": 1773550941,
"narHash": "sha256-bc+ZZCmOTNq86/svGnw0tVpH7vJaLYvGLLKFYP08Q8E=", "narHash": "sha256-wa/++bL2QeMUreNFBZEWluQfOYB0MnQIeGNMuaX9sfs=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "8eaee5c45428b28b8c47a83e4c09dccec5f279b5", "rev": "c469b6885f0dcd5c7c56bd935a0f08dbcd9e79e1",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -11,6 +11,7 @@
../../keys ../../keys
../../modules/sops ../../modules/sops
../../modules/docker ../../modules/docker
../../modules/nix-ld
./hardware.nix ./hardware.nix
./system.nix ./system.nix
]; ];

View file

@ -66,13 +66,6 @@ in
}; };
}; };
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
icu
];
};
boot.loader = { boot.loader = {
systemd-boot = { systemd-boot = {
enable = true; enable = true;

View file

@ -10,6 +10,7 @@
../../../user ../../../user
../../keys ../../keys
../../modules/sops ../../modules/sops
../../modules/nix-ld
./hardware.nix ./hardware.nix
./system.nix ./system.nix
]; ];

View file

@ -10,6 +10,7 @@
../../../user ../../../user
../../keys ../../keys
../../modules/sops ../../modules/sops
../../modules/nix-ld
./system.nix ./system.nix
]; ];
} }

View file

@ -0,0 +1,39 @@
{ pkgs, lib, config, ... }:
with lib;
let
cfg = config.modules.system.nix-ld;
in
{
options.modules.system.nix-ld = {
enable = mkOption {
type = types.bool;
default = any
(user: user.modules.user.neovim.enable or false)
(attrValues config.home-manager.users);
description = "Enable nix-ld so Mason-installed Neovim tools can run on NixOS.";
};
};
config = mkIf cfg.enable {
programs.nix-ld = {
enable = true;
libraries = with pkgs; [
curl
expat
fontconfig
freetype
glib
icu
libgcc
libGL
libxkbcommon
openssl
stdenv.cc.cc
zlib
zstd
];
};
};
}

View file

@ -13,7 +13,7 @@ in
}; };
home.file.".config/bash" = { home.file.".config/bash" = {
source = config.lib.file.mkOutOfStoreSymlink ./bash; source = ./bash;
recursive = true; recursive = true;
}; };

View file

@ -8,6 +8,9 @@ in
{ options.modules.user.git = { enable = mkEnableOption "user.git"; }; { options.modules.user.git = { enable = mkEnableOption "user.git"; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs = { programs = {
git = {
enable = true;
};
gh = { gh = {
enable = true; enable = true;
settings.git_protocol = "ssh"; settings.git_protocol = "ssh";
@ -16,11 +19,10 @@ in
home = { home = {
packages = with pkgs; [ packages = with pkgs; [
git
git-crypt git-crypt
]; ];
file.".config/git" = { file.".config/git" = {
source = config.lib.file.mkOutOfStoreSymlink ./git; source = ./git;
recursive = true; recursive = true;
}; };
}; };

@ -1 +1 @@
Subproject commit 7ea8c164bc6ab3eaea2ff5743cfa2db62fd62397 Subproject commit 8b16b7047c3fa70945cca5a058408b57b2ef2e7f

View file

@ -25,29 +25,29 @@ in
colors = { colors = {
primary = { primary = {
background = "#000000"; background = "#000000";
foreground = "#dadada"; foreground = "#cdd6f4";
}; };
normal = { normal = {
black = "#181818"; black = "#1e2127";
red = "#ff6b6b"; red = "#e06c75";
green = "#00b300"; green = "#98c379";
yellow = "#e8a060"; yellow = "#d19a66";
blue = "#88ddcc"; blue = "#61afef";
magenta = "#c490d0"; magenta = "#c678dd";
cyan = "#b3f6c0"; cyan = "#56b6c2";
white = "#dadada"; white = "#abb2bf";
}; };
bright = { bright = {
black = "#5a5a5a"; black = "#5c6370";
red = "#ff6b6b"; red = "#e06c75";
green = "#00b300"; green = "#98c379";
yellow = "#ffcc00"; yellow = "#d19a66";
blue = "#88ddcc"; blue = "#61afef";
magenta = "#c490d0"; magenta = "#c678dd";
cyan = "#b3f6c0"; cyan = "#56b6c2";
white = "#ffffff"; white = "#ffffff";
}; };
}; };

View file

@ -11,7 +11,6 @@ in
home.packages = with pkgs; [ home.packages = with pkgs; [
gimp gimp
libreoffice libreoffice
signal-desktop
]; ];
}; };
} }

View file

@ -12,26 +12,11 @@ in
defaultEditor = true; defaultEditor = true;
vimAlias = true; vimAlias = true;
vimdiffAlias = true; vimdiffAlias = true;
extraWrapperArgs = [ extraPackages = import ./pkgs.nix { inherit pkgs; };
"--suffix"
"PATH"
":"
"${config.home.homeDirectory}/.npm-global/bin"
];
extraPackages = with pkgs; [
gcc
cargo
rustc
fzf
fd
ripgrep
bat
];
}; };
home.file.".config/nvim" = { home.file.".config/nvim" = {
source = config.lib.file.mkOutOfStoreSymlink ./nvim; source = ./nvim;
recursive = true; recursive = true;
}; };
}; };

@ -1 +1 @@
Subproject commit 376b9c5c16b9d8b121b73516219082e57b397bc9 Subproject commit 79643b1a17336b43f09090aa51ffc18763e11552

View file

@ -0,0 +1,6 @@
{ pkgs, ... }:
with pkgs; [
gcc
lazygit
]

View file

@ -4,8 +4,6 @@ with lib;
let let
cfg = config.modules.user.pi; cfg = config.modules.user.pi;
npmGlobal = "${config.home.homeDirectory}/.npm-global"; npmGlobal = "${config.home.homeDirectory}/.npm-global";
piVersion = "0.70.5";
in in
{ options.modules.user.pi = { enable = mkEnableOption "user.pi"; }; { options.modules.user.pi = { enable = mkEnableOption "user.pi"; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -18,65 +16,13 @@ in
home.sessionPath = [ "${npmGlobal}/bin" ]; home.sessionPath = [ "${npmGlobal}/bin" ];
home.file.".pi/agent" = {
source = ./agent;
recursive = true;
};
programs.bash.initExtra = '' programs.bash.initExtra = ''
export LLAMACPP_API_KEY=$(cat /run/secrets/LLAMA_API_KEY) export LLAMACPP_API_KEY=$(cat /run/secrets/LLAMA_API_KEY)
''; '';
home.activation.installPiCodingAgent = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
PATH="${pkgs.nodejs_20}/bin:$PATH"
agentDir="${config.home.homeDirectory}/.pi/agent"
piPkgScope="${npmGlobal}/lib/node_modules/@mariozechner"
piPkgDir="${npmGlobal}/lib/node_modules/@mariozechner/pi-coding-agent"
piBin="${npmGlobal}/bin/pi"
run mkdir -p ${npmGlobal}
run mkdir -p "${npmGlobal}/bin"
run mkdir -p "$piPkgScope"
run mkdir -p "${config.home.homeDirectory}/.pi"
run mkdir -p "$agentDir"
if [ -e "$agentDir" ]; then
run chmod -R u+w "$agentDir"
run find "$agentDir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
fi
run cp -R ${./agent}/. "$agentDir"/
run chmod -R u+w "$agentDir"
run rm -f "$piBin"
run rm -f "${npmGlobal}/bin"/.pi-*
run rm -rf "$piPkgDir"
run rm -rf "$piPkgScope"/.pi-coding-agent-*
if ! run ${pkgs.nodejs_20}/bin/npm install -g --prefix ${npmGlobal} @mariozechner/pi-coding-agent@${piVersion}; then
warnEcho "pi-coding-agent install failed (offline or registry error)"
fi
if [ ! -f "$piPkgDir/package.json" ]; then
for candidate in "$piPkgScope"/.pi-coding-agent-*; do
if [ -f "$candidate/package.json" ]; then
run rm -rf "$piPkgDir"
run mv "$candidate" "$piPkgDir"
break
fi
done
fi
if [ -f "$piPkgDir/dist/cli.js" ]; then
run ln -sfn ../lib/node_modules/@mariozechner/pi-coding-agent/dist/cli.js "$piBin"
run chmod +x "$piPkgDir/dist/cli.js"
else
warnEcho "pi-coding-agent install did not produce dist/cli.js"
fi
for ext in "$agentDir"/extensions/*; do
if [ -f "$ext/package.json" ]; then
if [ -f "$ext/package-lock.json" ]; then
if ! run ${pkgs.nodejs_20}/bin/npm ci --prefix "$ext"; then
warnEcho "pi extension dependency install failed for $ext"
fi
else
if ! run ${pkgs.nodejs_20}/bin/npm install --prefix "$ext"; then
warnEcho "pi extension dependency install failed for $ext"
fi
fi
fi
done
'';
}; };
} }

View file

@ -16,7 +16,7 @@ in
vim vim
]; ];
file.".vim" = { file.".vim" = {
source = config.lib.file.mkOutOfStoreSymlink ./vim; source = ./vim;
recursive = true; recursive = true;
}; };
}; };