Compare commits

..

5 Commits

Author SHA1 Message Date
5e9e6bcd40 pi: fix llama.cpp provider discovery with auth
Some checks failed
Build and Deploy Desktop / deploy (push) Failing after 4s
Add api, authHeader, and discovery.type fields so omp can
discover models via GET /v1/models with the Bearer token.
2026-04-02 18:14:09 -04:00
3e35fea183 pi: fix openrouter apiKey, add llama.cpp provider
openrouter was broken: !cat + nix store path is not valid omp config.
Use builtins.readFile to inline the key at eval time.

Add self-hosted llama.cpp provider at llm.sigkill.computer with
Bearer token auth.
2026-04-02 17:57:51 -04:00
9a3ac53c50 mreow: power stuff 2026-04-02 13:06:59 -04:00
84bb728633 update 2026-04-02 12:53:25 -04:00
3768e032ba update 2026-04-02 00:07:24 -04:00
5 changed files with 84 additions and 55 deletions

102
flake.lock generated
View File

@@ -65,11 +65,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1775007163, "lastModified": 1775088444,
"narHash": "sha256-plS86OtgkWsAf/NtXc5iwxpBB+cOuyqjo5Xq2gEg8FQ=", "narHash": "sha256-hGWixWAyE3YhUQdHh1fZao8C2r7Khokx5CwzTdZdgKY=",
"owner": "sadjow", "owner": "sadjow",
"repo": "claude-code-nix", "repo": "claude-code-nix",
"rev": "335c96551a1650e0306b756039f15c3364d2e0ac", "rev": "b46a627009fd58cd0b28d0ea20d503f7562bc90a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -139,11 +139,11 @@
"doomemacs": { "doomemacs": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1774080407, "lastModified": 1775116700,
"narHash": "sha256-FYbalilgDFjIVwK+D6DjDos1IMmMGA20lRf8k6Ykm1Y=", "narHash": "sha256-gfX1Zh6EXXxbjkZBrpVHv4TGFuSTDDYlljQq3Sbxq+0=",
"owner": "doomemacs", "owner": "doomemacs",
"repo": "doomemacs", "repo": "doomemacs",
"rev": "d8d75443d39d95f3c5256504eb838e0acc62ef44", "rev": "598ee8ad81ea80e38514d04e3576666fa5011f18",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -162,11 +162,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775062601, "lastModified": 1775123075,
"narHash": "sha256-/5+NrxyE/JmHmnsSEve/zE7sTgXxrNSi+S+vAanmSSc=", "narHash": "sha256-gFkm83VNB8zoN29Kb3KajDo/5aL49AwslUFt8d2R5Ho=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "120ce11560e7ce7c73b9977ca15fe9915b921e82", "rev": "0e315e6cbe18c6174a62f13f458e2077d8073fbf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -183,11 +183,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1774843378, "lastModified": 1775102584,
"narHash": "sha256-8QLbY8F7UdxeQaW0KUVgr1/YPIupe+1lGjS5joR+ZCw=", "narHash": "sha256-DMqFfnsbE6XYMG4xkO3ergr2mqxFEfmt3ePDB1V0M+0=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "0a31b668e3ebb599f95dc518076d709e8dddb57c", "rev": "bda7b1b99e891711cacc68fac2fcdc06abc7fac9",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -237,11 +237,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1772408722, "lastModified": 1775087534,
"narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -315,11 +315,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775047159, "lastModified": 1775143651,
"narHash": "sha256-UWM4VZvfKaPwA9FMu7iZha5YAE8vsEtUazk+rFxmbTY=", "narHash": "sha256-S0RqAyDPMTcv9vASMaE8eY1QexFysAOdnxUxFHIPOyE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1ce9e62690dfdd7e76bd266ccb9a887778410eb2", "rev": "d166a078541982a76f14d3e06e9665fa5c9ed85e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -374,11 +374,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775024665, "lastModified": 1775071677,
"narHash": "sha256-NKd88/dc+IZ7zYASBw1d0ofYvwRm/N546XGsYqi+oRc=", "narHash": "sha256-EkVrhsEVG8FVodTPduAFC+qnb9YnKboF0It29zGJx8U=",
"owner": "Jovian-Experiments", "owner": "Jovian-Experiments",
"repo": "Jovian-NixOS", "repo": "Jovian-NixOS",
"rev": "133e3ac905ee61a4366af18e7c1d34f1b7dd5f7a", "rev": "049bfbe4cc042e6003414d0875f0a70873fc4d6b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -445,11 +445,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1775055825, "lastModified": 1775141156,
"narHash": "sha256-nsUa0Ey0K/POaJhouRThrw5WlBi2n8L8eCJtqzJa1vw=", "narHash": "sha256-tNpLkiOtmxCxCch4zPLoEGyaZK16ryOpQuujtix0AqY=",
"owner": "numtide", "owner": "numtide",
"repo": "llm-agents.nix", "repo": "llm-agents.nix",
"rev": "4e7f647bcd93b3bd95395c7c23e6a8474459f430", "rev": "09cd3ef62649bc47fa3eb34318bb6ef5096654dd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -472,11 +472,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1775042939, "lastModified": 1775089852,
"narHash": "sha256-qcCBdnnKj8g/TiYmfDl3LmTdLYVPxr08yht9JaTXW00=", "narHash": "sha256-zcX3hf2cTOQ06kRP+FCYbuaWhy+FLruLFp+D79Enjo4=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "0e4df2c05361ed0f5e8738335369b304a0962b02", "rev": "cfa91d98691d91cc604ab8f4e224819524c496ad",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -530,11 +530,11 @@
"systems": "systems_5" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1774962120, "lastModified": 1775121446,
"narHash": "sha256-DMl2y+wfxnjPgjGjuH0i8+a33mhe9WCD4fR1WU68GM0=", "narHash": "sha256-ZAW4jS/50hZb5BGBP7SaBt87MQfRLEKZm3KDrrXy91I=",
"owner": "marienz", "owner": "marienz",
"repo": "nix-doom-emacs-unstraightened", "repo": "nix-doom-emacs-unstraightened",
"rev": "7626225cbb0ef16baa88386ac59b123f6e2fb45b", "rev": "c00c67450a53f73ca8f8473eed409ca8510dd162",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -598,11 +598,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1774855581, "lastModified": 1775034801,
"narHash": "sha256-YkreHeMgTCYvJ5fESV0YyqQK49bHGe2B51tH6claUh4=", "narHash": "sha256-tsecHNsWwr4wSaM2oW9GwafMwE24J+xD8bKDoto3exY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "15c6719d8c604779cf59e03c245ea61d3d7ab69b", "rev": "8d029aa64915e54b7846873d9583af4c9fd21ea4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -614,11 +614,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1774709303, "lastModified": 1775036866,
"narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=", "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685", "rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -636,11 +636,11 @@
"noctalia-qs": "noctalia-qs" "noctalia-qs": "noctalia-qs"
}, },
"locked": { "locked": {
"lastModified": 1775039613, "lastModified": 1775142904,
"narHash": "sha256-5VzBe0SOXamABAbtjNF5Y7jaMbSeVtGQRhbICoJ6izo=", "narHash": "sha256-UGZq9V+sImNCZXJivXBtJJ1p5Ui24vRrXoDK1ulhyLE=",
"owner": "noctalia-dev", "owner": "noctalia-dev",
"repo": "noctalia-shell", "repo": "noctalia-shell",
"rev": "7b29c11d7aaf476723af14865665cf04750f8d20", "rev": "411a820f3cf210425f02306ed4d14a7e4ea75f9b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -659,11 +659,11 @@
"treefmt-nix": "treefmt-nix_2" "treefmt-nix": "treefmt-nix_2"
}, },
"locked": { "locked": {
"lastModified": 1774994931, "lastModified": 1775008123,
"narHash": "sha256-WmXA8kyqvDA226DRPrXyR6bLO9VsRr4SUAYCVH6H6Ns=", "narHash": "sha256-zsd/kbsgfX2YQAlbao40JxyeVDwsUmBGyUDZc/Vo1C4=",
"owner": "noctalia-dev", "owner": "noctalia-dev",
"repo": "noctalia-qs", "repo": "noctalia-qs",
"rev": "b053facf8421df220d0bf2496a543b23dee3ca85", "rev": "b87f41771c050d3c101d1528532de53293cba6da",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -742,11 +742,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775013181, "lastModified": 1775099554,
"narHash": "sha256-zPrt6oNM1r/RO5bWYaZ3hthfG9vzkr6kQdoqDd5x4Qw=", "narHash": "sha256-3xBsGnGDLOFtnPZ1D3j2LU19wpAlYefRKTlkv648rU0=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "e8046c1d9ccadd497c2344d8fa49dab62f22f7be", "rev": "8d6387ed6d8e6e6672fd3ed4b61b59d44b124d99",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -853,11 +853,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1773297127, "lastModified": 1775125835,
"narHash": "sha256-6E/yhXP7Oy/NbXtf1ktzmU8SdVqJQ09HC/48ebEGBpk=", "narHash": "sha256-2qYcPgzFhnQWchHo0SlqLHrXpux5i6ay6UHA+v2iH4U=",
"owner": "numtide", "owner": "numtide",
"repo": "treefmt-nix", "repo": "treefmt-nix",
"rev": "71b125cd05fbfd78cab3e070b73544abe24c5016", "rev": "75925962939880974e3ab417879daffcba36c4a3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -949,11 +949,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1775021133, "lastModified": 1775106234,
"narHash": "sha256-JB0u0evfSlmNg9HdGDxtXjaCcdKUpFPdSAMGxvJo5Pw=", "narHash": "sha256-ZCHEj7dvqaguQy2yOHELkrkgPRAbnno+Lg9PAAiBv44=",
"owner": "0xc000022070", "owner": "0xc000022070",
"repo": "zen-browser-flake", "repo": "zen-browser-flake",
"rev": "4bf1a6837064486c4f573a9d500c4cf3c1c075c0", "rev": "0118405698718bd82343050d4419072fffd0df54",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -211,8 +211,6 @@ in
# power stuff # power stuff
powerstat powerstat
nodePackages_latest.nodejs
yt-dlp yt-dlp
] ]
rust_pkgs rust_pkgs

View File

@@ -18,11 +18,19 @@ let
}; };
}; };
# provider config — openrouter API key read from secrets at runtime # provider config — secrets read at eval time via builtins.readFile
# (omp treats apiKey as env-var-name-or-literal, not a shell command)
ompModels = { ompModels = {
providers = { providers = {
openrouter = { openrouter = {
apiKey = "!cat ${../secrets/openrouter_api_key}"; apiKey = lib.strings.trim (builtins.readFile ../secrets/openrouter_api_key);
};
"llama.cpp" = {
baseUrl = "https://llm.sigkill.computer";
apiKey = lib.strings.trim (builtins.readFile ../secrets/llama_cpp_api_key);
api = "openai-responses";
authHeader = true;
discovery.type = "llama.cpp";
}; };
}; };
}; };

Binary file not shown.

View File

@@ -24,6 +24,29 @@
# if I move to another lock screen program, i will have to replace `swaylock` # if I move to another lock screen program, i will have to replace `swaylock`
security.pam.services.swaylock = { }; security.pam.services.swaylock = { };
# Kernel-level power tuning. These are boot-time / module-load-time settings
# that power-profiles-daemon (in common.nix) does not manage. ppd handles
# governor and EPP at runtime; these cover everything else.
boot.kernelParams = [
# Disable NMI watchdog. Eliminates periodic perf-counter interrupts
# across all cores (~1 W). Kernel softlockup watchdog remains active.
"nmi_watchdog=0"
# Route kernel work items to already-busy CPUs rather than waking idle
# ones. Reduces C-state exit frequency -- significant on battery where
# cores idle often.
"workqueue.power_efficient=1"
];
boot.kernel.sysctl."kernel.nmi_watchdog" = 0;
# Power-gate the HDA codec between audio activity. 1-second inactivity
# timeout; controller powers down fully. Wakes transparently on next
# audio event -- no audible artifacts on Framework 13 AMD.
boot.extraModprobeConfig = ''
options snd_hda_intel power_save=1 power_save_controller=Y
'';
# Greetd display manager # Greetd display manager
services.greetd = { services.greetd = {
enable = true; enable = true;