refactor(niri): base niri.outputs on config.monitors

This commit is contained in:
Nickolaj Jepsen 2025-08-23 18:42:54 +02:00
parent ba100b98ba
commit 1bed4d5d9f
10 changed files with 133 additions and 119 deletions

View file

@ -1,26 +1,32 @@
{pkgs, config, username, pkgsUnstable, ...}: let
llmConfig = if pkgs.stdenv.isDarwin then
"Library/Application Support/io.datasette.llm"
else
".config/io.datasette.llm";
pythonEnv = pkgsUnstable.python3.withPackages (pp: with pp; [
llm
llm-anthropic
llm-gemini
llm-tools-sqlite
llm-fragments-github
llm-cmd
llm-jq
llm-github-copilot
llm-git
]);
{
pkgs,
config,
username,
pkgsUnstable,
...
}: let
llmConfig =
if pkgs.stdenv.isDarwin
then "Library/Application Support/io.datasette.llm"
else ".config/io.datasette.llm";
pythonEnv = pkgsUnstable.python3.withPackages (pp:
with pp; [
llm
llm-anthropic
llm-gemini
llm-tools-sqlite
llm-fragments-github
llm-cmd
llm-jq
llm-github-copilot
llm-git
]);
llmPkgWithPlugins = pkgs.writeShellScriptBin "llm" ''
unset PYTHONPATH # Otherwise it breaks in Python devenvs
export $(grep -v '^#' ${config.age.secrets.llm-api-key.path} | xargs)
exec ${pythonEnv}/bin/llm "''${@}"
'';
in
{
in {
age.secrets.llm-api-key = {
rekeyFile = ../../secrets/llm-api-key.env.age;
mode = "0600";