From 87939ce630915969e2ec2376ffb3a25820373888 Mon Sep 17 00:00:00 2001 From: m3tm3re
Date: Sat, 28 Mar 2026 10:17:29 +0100 Subject: [PATCH] feat: implement agent skills --- flake.lock | 215 +++++++++++++++++++++--------- flake.nix | 22 ++- home/features/cli/default.nix | 1 + home/features/cli/secrets.nix | 1 + home/features/cli/television.nix | 1 - home/features/coding/default.nix | 3 +- home/features/coding/opencode.nix | 50 ++++--- home/features/desktop/default.nix | 1 + home/features/desktop/theme.nix | 2 + home/m3tam3re/home-server.nix | 1 + home/m3tam3re/home.nix | 7 + overlays/default.nix | 8 +- 12 files changed, 212 insertions(+), 100 deletions(-) diff --git a/flake.lock b/flake.lock index 3b9be19..ceae709 100644 --- a/flake.lock +++ b/flake.lock @@ -22,19 +22,18 @@ } }, "agents": { - "flake": false, + "inputs": { + "nixpkgs": "nixpkgs_2" + }, "locked": { - "lastModified": 1773654477, - "narHash": "sha256-de+B85eBY2SyT0uPLlVxKCy6lsKYXhtA2mo2zO6MXlg=", - "ref": "refs/heads/master", - "rev": "a4ae041e1d2343000da7b7098195f166b58c0d11", - "revCount": 65, - "type": "git", - "url": "https://code.m3ta.dev/m3tam3re/AGENTS" + "lastModified": 1774683796, + "narHash": "sha256-idEZ4OMgD27cWFJ+/6IF1F8BcmnpH9orGVhZUvzkDig=", + "path": "/home/m3tam3re/p/AI/AGENTS", + "type": "path" }, "original": { - "type": "git", - "url": "https://code.m3ta.dev/m3tam3re/AGENTS" + "path": "/home/m3tam3re/p/AI/AGENTS", + "type": "path" } }, "base16-schemes": { @@ -53,6 +52,27 @@ "type": "github" } }, + "basecamp": { + "inputs": { + "nixpkgs": [ + "m3ta-nixpkgs", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1774509076, + "narHash": "sha256-3Z/1xfP4jJsSONprD5rMLpag+YFVDCkfGg1rY5+w20s=", + "owner": "basecamp", + "repo": "basecamp-cli", + "rev": "3d601714b184004af17e169d227f15afd14bc5f9", + "type": "github" + }, + "original": { + "owner": "basecamp", + "repo": "basecamp-cli", + "type": "github" + } + }, "blueprint": { "inputs": { "nixpkgs": [ @@ -242,11 +262,11 @@ ] }, "locked": { - "lastModified": 1774007980, - "narHash": "sha256-FOnZjElEI8pqqCvB6K/1JRHTE8o4rer8driivTpq2uo=", + "lastModified": 1774647770, + "narHash": "sha256-UNNi14XiqRWWjO8ykbFwA5wRwx7EscsC+GItOVpuGjc=", "owner": "nix-community", "repo": "home-manager", - "rev": "9670de2921812bc4e0452f6e3efd8c859696c183", + "rev": "02371c05a04a2876cf92e2d67a259e8f87399068", "type": "github" }, "original": { @@ -302,14 +322,14 @@ "inputs": { "flake-utils": "flake-utils", "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1767767975, - "narHash": "sha256-yBejG3j6OLQYn87UozFAI3q9a1vH00u9xjIf2Q4V5j8=", + "lastModified": 1774257081, + "narHash": "sha256-92ZbaBfsEXEE7VaWJjv9aRSk3l9nyoYYyMe2AwTqSZI=", "owner": "Jas-SinghFSU", "repo": "HyprPanel", - "rev": "0e73df1dfedf0f6fa21ed0ae5e031b0663c8f400", + "rev": "e919b4a8a8ab5f2a0752f68576ab3eed6993cefd", "type": "github" }, "original": { @@ -338,16 +358,16 @@ "blueprint": "blueprint", "bun2nix": "bun2nix", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "systems": "systems_3", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1774063450, - "narHash": "sha256-p1Y2iUsWyLKk1z35OdAGcEpmbpRTG3AgjdyAVh5kmc8=", + "lastModified": 1774682581, + "narHash": "sha256-LLeo1dqUipMDjaIcZ9XCXU7gjL5S1Zi9ZfyATJEx/DM=", "owner": "numtide", "repo": "llm-agents.nix", - "rev": "71c3b957aeb56aea79fd9a964e3f0bff2b794251", + "rev": "827aba851e05853a583ec618d96ff0d7c07c5038", "type": "github" }, "original": { @@ -358,23 +378,21 @@ }, "m3ta-nixpkgs": { "inputs": { - "nixpkgs": "nixpkgs_4", + "basecamp": "basecamp", + "nixpkgs": "nixpkgs_5", "nixpkgs-master": "nixpkgs-master", "opencode": "opencode", "openspec": "openspec" }, "locked": { - "lastModified": 1774058505, - "narHash": "sha256-V+/tHGZENnw995hzC2kOSiqpyhswLXeNAkbAYolGxPg=", - "ref": "refs/heads/master", - "rev": "25968af71156c1e7e71702853db45d3410d500bc", - "revCount": 177, - "type": "git", - "url": "https://code.m3ta.dev/m3tam3re/nixpkgs" + "lastModified": 1774687878, + "narHash": "sha256-xkw2bR2IEwlwaurw15riy5VvooGnUbvg80ElCnzp5uw=", + "path": "/home/m3tam3re/p/NIX/nixpkgs", + "type": "path" }, "original": { - "type": "git", - "url": "https://code.m3ta.dev/m3tam3re/nixpkgs" + "path": "/home/m3tam3re/p/NIX/nixpkgs", + "type": "path" } }, "nix-colors": { @@ -414,7 +432,7 @@ "nixos-generators": { "inputs": { "nixlib": "nixlib", - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1769813415, @@ -511,11 +529,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1774053289, - "narHash": "sha256-U+wnCEgsGdRqXfUlt1yZffhLMGbUnkb4MYmisBI+KcU=", + "lastModified": 1774532607, + "narHash": "sha256-koMw5uDa2TwQ3/lZ49Jiy4Qj1lNjv80YnCen11P+uKY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "28afc93f3c091ae6cacfba64d8a486fab9c9af07", + "rev": "c5f84fa27a537e6899c9f636f8810df05fc625cb", "type": "github" }, "original": { @@ -527,11 +545,11 @@ }, "nixpkgs-master_2": { "locked": { - "lastModified": 1774078191, - "narHash": "sha256-nyxxxW1/2ouu9dU0I02ul5pHrmUrE1JVFhfFlmYe3Lw=", + "lastModified": 1774681808, + "narHash": "sha256-3bETV1cWT1BdqAkOGTOjhnM+zD6hnHfTCMud/nkRikA=", "owner": "nixos", "repo": "nixpkgs", - "rev": "09061f748ee21f68a089cd5d91ec1859cd93d0be", + "rev": "da8a6853d9800fcdc696babb128c2f4146e327b5", "type": "github" }, "original": { @@ -543,11 +561,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1773814637, - "narHash": "sha256-GNU+ooRmrHLfjlMsKdn0prEKVa0faVanm0jrgu1J/gY=", + "lastModified": 1774388614, + "narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "fea3b367d61c1a6592bc47c72f40a9f3e6a53e96", + "rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e", "type": "github" }, "original": { @@ -558,6 +576,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1772479524, + "narHash": "sha256-u7nCaNiMjqvKpE+uZz9hE7pgXXTmm5yvdtFaqzSzUQI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4215e62dc2cd3bc705b0a423b9719ff6be378a43", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1750776420, "narHash": "sha256-/CG+w0o0oJ5itVklOoLbdn2dGB0wbZVOoDm4np6w09A=", @@ -573,13 +607,13 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { - "lastModified": 1773628058, - "narHash": "sha256-hpXH0z3K9xv0fHaje136KY872VT2T5uwxtezlAskQgY=", + "lastModified": 1774273680, + "narHash": "sha256-a++tZ1RQsDb1I0NHrFwdGuRlR5TORvCEUksM459wKUA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f8573b9c935cfaa162dd62cc9e75ae2db86f85df", + "rev": "fdc7b8f7b30fdbedec91b71ed82f36e1637483ed", "type": "github" }, "original": { @@ -589,13 +623,13 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { - "lastModified": 1773821835, - "narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=", + "lastModified": 1774386573, + "narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0", + "rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9", "type": "github" }, "original": { @@ -605,7 +639,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1736657626, "narHash": "sha256-FWlPMUzp0lkQBdhKlPqtQdqmp+/C+1MBiEytaYfrCTY=", @@ -621,13 +655,13 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { - "lastModified": 1773821835, - "narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=", + "lastModified": 1774386573, + "narHash": "sha256-4hAV26quOxdC6iyG7kYaZcM3VOskcPUrdCQd/nx8obc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0", + "rev": "46db2e09e1d3f113a13c0d7b81e2f221c63b8ce9", "type": "github" }, "original": { @@ -637,7 +671,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1710272261, "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", @@ -661,11 +695,11 @@ ] }, "locked": { - "lastModified": 1774077133, - "narHash": "sha256-seaMLqcOqVmXxflfCo/porVj8mcX8qn8HMHUPXC4Now=", + "lastModified": 1774673976, + "narHash": "sha256-vEP64rFVBgqfinfM+2Ap2bgvnlk/BNwZAgbYSleKbS0=", "owner": "nix-community", "repo": "NUR", - "rev": "800657aa193a98b84f8262300a4ccc4f5de4e7c9", + "rev": "6298c3410e4000a9e91c344ac5f163b043534e03", "type": "github" }, "original": { @@ -682,16 +716,16 @@ ] }, "locked": { - "lastModified": 1773628428, - "narHash": "sha256-JUlFfILzcUCME3mOxdxDbcCXphNVEfVGIKhwAwtJPl8=", + "lastModified": 1774392635, + "narHash": "sha256-04eOIBHX9e8Brwn+uL/7q8szvRUilr4G0B8eB76dhKU=", "owner": "anomalyco", "repo": "opencode", - "rev": "4ee426ba549131c4903a71dfb6259200467aca81", + "rev": "0dcdf5f529dced23d8452c9aa5f166abb24d8f7c", "type": "github" }, "original": { "owner": "anomalyco", - "ref": "v1.2.27", + "ref": "v1.3.2", "repo": "opencode", "type": "github" } @@ -728,20 +762,23 @@ "m3ta-nixpkgs": "m3ta-nixpkgs", "nix-colors": "nix-colors", "nixos-generators": "nixos-generators", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "nixpkgs-45570c2": "nixpkgs-45570c2", "nixpkgs-9e58ed7": "nixpkgs-9e58ed7", "nixpkgs-locked": "nixpkgs-locked", "nixpkgs-master": "nixpkgs-master_2", "nixpkgs-stable": "nixpkgs-stable", "nur": "nur", - "rose-pine-hyprcursor": "rose-pine-hyprcursor" + "rose-pine-hyprcursor": "rose-pine-hyprcursor", + "skills-anthropic": "skills-anthropic", + "skills-basecamp": "skills-basecamp", + "skills-kestra": "skills-kestra" } }, "rose-pine-hyprcursor": { "inputs": { "hyprlang": "hyprlang", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_8", "utils": "utils" }, "locked": { @@ -758,6 +795,54 @@ "type": "github" } }, + "skills-anthropic": { + "flake": false, + "locked": { + "lastModified": 1774451446, + "narHash": "sha256-w//9LB1OVG9jlllY+VDse7Js0dn5x6Ys2vPuQACKsTM=", + "owner": "anthropics", + "repo": "skills", + "rev": "98669c11ca63e9c81c11501e1437e5c47b556621", + "type": "github" + }, + "original": { + "owner": "anthropics", + "repo": "skills", + "type": "github" + } + }, + "skills-basecamp": { + "flake": false, + "locked": { + "lastModified": 1774647994, + "narHash": "sha256-rlag0DprIbYK12lsHyYtLcKwTKi1K0YHIy6v01+r9p8=", + "owner": "basecamp", + "repo": "basecamp-cli", + "rev": "c42190e9aaa135cc99e8ae0af388ed5b88c10c37", + "type": "github" + }, + "original": { + "owner": "basecamp", + "repo": "basecamp-cli", + "type": "github" + } + }, + "skills-kestra": { + "flake": false, + "locked": { + "lastModified": 1773046826, + "narHash": "sha256-w1zFqfCAcu9FsaGf8uAyaaYVbSwwtUzotfDJ1jSt+q0=", + "owner": "kestra-io", + "repo": "agent-skills", + "rev": "b536825bf5b9213d7a7fb5ab7c47823f1044490b", + "type": "github" + }, + "original": { + "owner": "kestra-io", + "repo": "agent-skills", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index ee225ef..e9c95aa 100644 --- a/flake.nix +++ b/flake.nix @@ -22,8 +22,8 @@ nixpkgs-9e58ed7.url = "github:nixos/nixpkgs/9e58ed7ba759d81c98f033b7f5eba21ca68f53b0"; nixpkgs-master.url = "github:nixos/nixpkgs/master"; - m3ta-nixpkgs.url = "git+https://code.m3ta.dev/m3tam3re/nixpkgs"; - # m3ta-nixpkgs.url = "path:/home/m3tam3re/p/NIX/nixpkgs"; + # m3ta-nixpkgs.url = "git+https://code.m3ta.dev/m3tam3re/nixpkgs"; + m3ta-nixpkgs.url = "path:/home/m3tam3re/p/NIX/nixpkgs"; llm-agents.url = "github:numtide/llm-agents.nix"; # @@ -45,8 +45,20 @@ nix-colors.url = "github:misterio77/nix-colors"; agents = { - # url = "path:/home/m3tam3re/p/AI/AGENTS"; - url = "git+https://code.m3ta.dev/m3tam3re/AGENTS"; + url = "path:/home/m3tam3re/p/AI/AGENTS"; + # url = "git+https://code.m3ta.dev/m3tam3re/AGENTS"; + }; + ## Skills + skills-basecamp = { + url = "github:basecamp/basecamp-cli"; + flake = false; + }; + skills-anthropic = { + url = "github:anthropics/skills"; + flake = false; + }; + skills-kestra = { + url = "github:kestra-io/agent-skills"; flake = false; }; }; @@ -94,7 +106,6 @@ inherit inputs outputs; system = "x86_64-linux"; }; - system = "x86_64-linux"; modules = [ ./hosts/m3-atlas inputs.disko.nixosModules.disko @@ -120,7 +131,6 @@ inherit inputs outputs; system = "x86_64-linux"; }; - system = "x86_64-linux"; modules = [ ./hosts/m3-helios inputs.disko.nixosModules.disko diff --git a/home/features/cli/default.nix b/home/features/cli/default.nix index a1f1230..46c05ff 100644 --- a/home/features/cli/default.nix +++ b/home/features/cli/default.nix @@ -198,6 +198,7 @@ }; home.packages = with pkgs; [ + basecamp comma coreutils devenv diff --git a/home/features/cli/secrets.nix b/home/features/cli/secrets.nix index 57a55d3..c1848f3 100644 --- a/home/features/cli/secrets.nix +++ b/home/features/cli/secrets.nix @@ -15,6 +15,7 @@ in { package = pkgs.pass-wayland.withExtensions (exts: [exts.pass-otp exts.pass-import]); + settings = {PASSWORD_STORE_DIR = "$XDG_DATA_HOME/password-store";}; }; home.packages = with pkgs; [pinentry-gnome3]; }; diff --git a/home/features/cli/television.nix b/home/features/cli/television.nix index 58b92a1..bc1b036 100644 --- a/home/features/cli/television.nix +++ b/home/features/cli/television.nix @@ -1,7 +1,6 @@ { config, lib, - pkgs, ... }: with lib; let diff --git a/home/features/coding/default.nix b/home/features/coding/default.nix index 84da838..3c177d2 100644 --- a/home/features/coding/default.nix +++ b/home/features/coding/default.nix @@ -67,12 +67,11 @@ pyrefly nixd nodejs - opencode-desktop + # opencode-desktop (qmd.override { vulkanSupport = videoDrivers == ["amdgpu"]; cudaSupport = videoDrivers == ["nvidia"]; }) - pi openspec alejandra sidecar diff --git a/home/features/coding/opencode.nix b/home/features/coding/opencode.nix index b86f238..6a0b9a3 100644 --- a/home/features/coding/opencode.nix +++ b/home/features/coding/opencode.nix @@ -1,27 +1,33 @@ -{inputs, ...}: { - xdg.configFile = { - "opencode/commands" = { - source = "${inputs.agents}/commands"; - recursive = true; - }; - "opencode/context" = { - source = "${inputs.agents}/context"; - recursive = true; - }; - "opencode/prompts" = { - source = "${inputs.agents}/prompts"; - recursive = true; - }; - "opencode/skills" = { - source = "${inputs.agents}/skills"; - recursive = true; - }; - "opencode/rules" = { - source = "${inputs.agents}/rules"; - recursive = true; - }; +{ + inputs, + system, + ... +}: let + pkgs = inputs.nixpkgs.legacyPackages.${system}; +in { + # Skills — composed from custom + external sources + xdg.configFile."opencode/skills".source = inputs.agents.lib.mkOpencodeSkills { + inherit pkgs; + customSkills = "${inputs.agents}/skills"; + externalSkills = [ + { + src = inputs.skills-anthropic; + selectSkills = ["docx" "frontend-design" "mcp-builder" "pdf" "mcp-builder"]; + } + { + src = inputs.skills-basecamp; + } + { + src = inputs.skills-kestra; + } + ]; }; + # Other config — symlinked directly + xdg.configFile."opencode/context".source = "${inputs.agents}/context"; + xdg.configFile."opencode/commands".source = "${inputs.agents}/commands"; + xdg.configFile."opencode/prompts".source = "${inputs.agents}/prompts"; + programs.opencode = { enable = true; enableMcpIntegration = true; diff --git a/home/features/desktop/default.nix b/home/features/desktop/default.nix index e31ab82..fdcaa37 100644 --- a/home/features/desktop/default.nix +++ b/home/features/desktop/default.nix @@ -42,6 +42,7 @@ userDirs = { enable = true; createDirectories = true; + setSessionVariables = true; }; }; diff --git a/home/features/desktop/theme.nix b/home/features/desktop/theme.nix index 936956c..ee2aa17 100644 --- a/home/features/desktop/theme.nix +++ b/home/features/desktop/theme.nix @@ -1,4 +1,5 @@ { + config, pkgs, ... }: { @@ -16,5 +17,6 @@ name = "Dracula"; package = pkgs.dracula-icon-theme; }; + gtk4.theme = config.gtk.theme; }; } diff --git a/home/m3tam3re/home-server.nix b/home/m3tam3re/home-server.nix index 78f6e3d..d08932d 100644 --- a/home/m3tam3re/home-server.nix +++ b/home/m3tam3re/home-server.nix @@ -81,6 +81,7 @@ programs.git = { enable = true; + signing.format = null; settings = { user = { name = "m3tm3re"; diff --git a/home/m3tam3re/home.nix b/home/m3tam3re/home.nix index 0bc1c30..6681d2d 100644 --- a/home/m3tam3re/home.nix +++ b/home/m3tam3re/home.nix @@ -87,6 +87,7 @@ programs.git = { enable = true; + signing.format = null; settings = { user = { name = "m3tm3re"; @@ -123,6 +124,12 @@ port = 2022; identityFile = "~/.ssh/sascha.koenig"; }; + "AZ-PRM-1" = { + hostname = "192.168.152.76"; + user = "sascha.koenig"; + port = 2022; + identityFile = "~/.ssh/sascha.koenig"; + }; "github.com" = { hostname = "github.com"; user = "m3tam3re"; diff --git a/overlays/default.nix b/overlays/default.nix index 048807c..46d4d9d 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -34,28 +34,28 @@ stable-packages = final: _prev: { stable = import inputs.nixpkgs-stable { - system = final.system; + system = final.stdenv.hostPlatform.system; config.allowUnfree = true; }; }; pinned-packages = final: _prev: { pinned = import inputs.nixpkgs-9472de4 { - system = final.system; + system = final.stdenv.hostPlatform.system; config.allowUnfree = true; }; }; locked-packages = final: _prev: { locked = import inputs.nixpkgs-locked { - system = final.system; + system = final.stdenv.hostPlatform.system; config.allowUnfree = true; }; }; master-packages = final: _prev: { master = import inputs.nixpkgs-master { - system = final.system; + system = final.stdenv.hostPlatform.system; config.allowUnfree = true; }; };