revert(nixos): undo bad system update
Restore the pre-update Pi packaging and Rofi option from PR 124 after the associated deployment exposed a performance regression.
Refs: 1b4dc7762
This commit is contained in:
@@ -34,7 +34,7 @@ in
|
|||||||
# Application launch is the only mode, kept minimal so the prompt opens
|
# Application launch is the only mode, kept minimal so the prompt opens
|
||||||
# as fast as rofi can read the desktop entries.
|
# as fast as rofi can read the desktop entries.
|
||||||
# Icons are off: resolving one per entry is the bulk of drun's startup.
|
# Icons are off: resolving one per entry is the bulk of drun's startup.
|
||||||
settings = {
|
extraConfig = {
|
||||||
modi = "drun";
|
modi = "drun";
|
||||||
show-icons = false;
|
show-icons = false;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
# home-manager, which ships the package and manages global settings.
|
# home-manager, which ships the package and manages global settings.
|
||||||
# The login credential is left unmanaged, so it survives rebuilds.
|
# The login credential is left unmanaged, so it survives rebuilds.
|
||||||
let
|
let
|
||||||
user = config.user.name; # NOLINT(let_order)
|
user = config.user.name;
|
||||||
piDir = "${config.users.users.${user}.home}/.pi/agent";
|
piDir = "${config.users.users.${user}.home}/.pi/agent";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -20,78 +20,9 @@ in
|
|||||||
home-manager.users.${user} = {
|
home-manager.users.${user} = {
|
||||||
programs.pi-coding-agent = {
|
programs.pi-coding-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.buildNpmPackage {
|
package = pkgs.pi-coding-agent.overrideAttrs {
|
||||||
pname = "pi-coding-agent";
|
|
||||||
version = "0.85.1";
|
|
||||||
src = ../../../../../third_party/pi;
|
src = ../../../../../third_party/pi;
|
||||||
npmDepsHash = "sha256-jzlsZIQzfl1FCZZ5//dHFWwMfBZQ4nRD6KB4HHifPqE=";
|
patches = [ ];
|
||||||
npmWorkspace = "packages/coding-agent";
|
|
||||||
npmRebuildFlags = [ "--ignore-scripts" ];
|
|
||||||
dontNpmPrune = true;
|
|
||||||
|
|
||||||
preConfigure = ''
|
|
||||||
mkdir -p packages/ai/src/providers/data
|
|
||||||
tar --extract --gzip \
|
|
||||||
--file=${
|
|
||||||
pkgs.fetchurl {
|
|
||||||
url = "https://registry.npmjs.org/@earendil-works/pi-ai/-/pi-ai-0.85.1.tgz";
|
|
||||||
hash = "sha256-r30RmGF5RFzm/oizfVfeIvgjwP/TplyuMcVVt/XpklM=";
|
|
||||||
}
|
|
||||||
} \
|
|
||||||
--directory=packages/ai/src/providers/data \
|
|
||||||
--strip-components=4 \
|
|
||||||
package/dist/providers/data
|
|
||||||
'';
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
runHook preBuild
|
|
||||||
npm run build:offline
|
|
||||||
runHook postBuild
|
|
||||||
'';
|
|
||||||
|
|
||||||
preInstall = ''
|
|
||||||
npm prune --omit=dev --no-save
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
local nm="$out/lib/node_modules/pi-monorepo/node_modules"
|
|
||||||
|
|
||||||
for ws in @earendil-works/chord:packages/chord \
|
|
||||||
@earendil-works/pi-ai:packages/ai \
|
|
||||||
@earendil-works/pi-agent-core:packages/agent \
|
|
||||||
@earendil-works/pi-client:packages/client \
|
|
||||||
@earendil-works/pi-protocol:packages/protocol \
|
|
||||||
@earendil-works/pi-telemetry:packages/telemetry \
|
|
||||||
@earendil-works/pi-tui:packages/tui; do
|
|
||||||
IFS=: read -r pkg src <<< "$ws"
|
|
||||||
rm "$nm/$pkg"
|
|
||||||
cp -r "$src" "$nm/$pkg"
|
|
||||||
done
|
|
||||||
|
|
||||||
find "$nm" -type l -lname '*/packages/*' -delete
|
|
||||||
find "$nm/.bin" -xtype l -delete
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgs.makeBinaryWrapper ];
|
|
||||||
postFixup = ''
|
|
||||||
wrapProgram "$out/bin/pi" --prefix PATH : ${
|
|
||||||
lib.makeBinPath [
|
|
||||||
pkgs.ripgrep
|
|
||||||
pkgs.fd
|
|
||||||
]
|
|
||||||
} \
|
|
||||||
--set-default PI_SKIP_VERSION_CHECK 1 \
|
|
||||||
--set-default PI_TELEMETRY 0
|
|
||||||
'';
|
|
||||||
|
|
||||||
doInstallCheck = true;
|
|
||||||
nativeInstallCheckInputs = [
|
|
||||||
pkgs.writableTmpDirAsHomeHook
|
|
||||||
pkgs.versionCheckHook
|
|
||||||
];
|
|
||||||
versionCheckKeepEnvironment = [ "HOME" ];
|
|
||||||
versionCheckProgram = "${placeholder "out"}/bin/pi";
|
|
||||||
versionCheckProgramArg = "--version";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
|||||||
Reference in New Issue
Block a user