From f29ddff912ddcd58a4726736702b24655505ce09 Mon Sep 17 00:00:00 2001 From: Martin Fischer Date: Sat, 17 Oct 2026 10:36:36 +0200 Subject: refactor: introduce nixos/default.nix The system prompt addition is to make it run `npins show ` rather than `npins show` when looking for a specific pin. `npins get-path` is mentioned because the model doesn't "know" it yet (the subcommand was introduced in 2025 Dec). --- nixos/profiles/workstation/default.nix | 15 ++++++++++++--- nixos/profiles/workstation/llm.nix | 1 + 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'nixos/profiles') diff --git a/nixos/profiles/workstation/default.nix b/nixos/profiles/workstation/default.nix index 578cece..77891fe 100644 --- a/nixos/profiles/workstation/default.nix +++ b/nixos/profiles/workstation/default.nix @@ -1,4 +1,13 @@ -{ config, lib, pkgs, pkgs-unstable, sources, ... }: +{ + config, + configurationPath, + lib, + nixpkgsPath, + pkgs, + pkgs-unstable, + sources, + ... +}: let cfg = config.workstation; @@ -24,9 +33,9 @@ in config = { # Makes commands default to the same Nixpkgs, config, overlays and NixOS configuration nix.nixPath = [ - "nixpkgs=${toString }" + "nixpkgs=${toString nixpkgsPath}" "nixpkgs-unstable=${pkgs-unstable.path}" - "nixos-config=${toString }" + "nixos-config=${toString configurationPath}" ]; environment.variables.NIXPKGS_CONFIG = lib.mkForce (toString ./nixpkgs/config.nix); diff --git a/nixos/profiles/workstation/llm.nix b/nixos/profiles/workstation/llm.nix index a24a14c..a0dfc92 100644 --- a/nixos/profiles/workstation/llm.nix +++ b/nixos/profiles/workstation/llm.nix @@ -46,6 +46,7 @@ let --chdir "$physical_pwd" \ ${pkgs-unstable.pi-coding-agent}/bin/pi \ --append-system-prompt "You're running in a sandbox with an ephemeral root filesystem and a separate PID namespace. The current working directory and a few configuration and cache paths are mounted from the host." \ + --append-system-prompt "$HOME/.config/pi/APPEND_SYSTEM.md" \ "$@" ''; -- cgit v1.3.1