feat(agent-skills): wire skills flake for global agent skills

Add the skills flake as an input and a module that imports its
home-manager module into every host via home-manager.sharedModules,
exposing programs.agents.skills. The global skill selection lives in
modules/agent-skills.nix and is empty for now; per-skill granularity
comes from the flake's own listOf-package option, and the placement
self-gates on the agent harness being enabled.
This commit is contained in:
2026-07-23 08:35:32 -04:00
parent 23b1a30c2a
commit a3e3e80c83
3 changed files with 100 additions and 1 deletions

79
flake.lock generated
View File

@@ -181,6 +181,24 @@
"url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.5.0.tar.gz"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
@@ -299,6 +317,27 @@
"type": "github"
}
},
"home-manager_4": {
"inputs": {
"nixpkgs": [
"skills",
"nixpkgs"
]
},
"locked": {
"lastModified": 1784725727,
"narHash": "sha256-J5+C9wsO0lhDyUalQzfplDbRjyHDYeEH5+9sdyXtwa8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "041a999e8c1c5b731913855909e68d30ca69b8e0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixos-hardware": {
"inputs": {
"nixpkgs": [
@@ -441,10 +480,33 @@
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixvim": "nixvim",
"skills": "skills",
"sops-nix": "sops-nix",
"stylix": "stylix"
}
},
"skills": {
"inputs": {
"flake-utils": "flake-utils",
"home-manager": "home-manager_4",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1784776947,
"narHash": "sha256-IGVn6Z7dfeArObZvz7cLsGqJD8ipP2VkAZC/bOJgvJI=",
"ref": "refs/heads/main",
"rev": "1caf18d72dd7cad7304401da0db6a6ba853d8827",
"revCount": 5,
"type": "git",
"url": "https://git.alexion.dev/alexion/skills"
},
"original": {
"type": "git",
"url": "https://git.alexion.dev/alexion/skills"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
@@ -478,7 +540,7 @@
"nixpkgs"
],
"nur": "nur",
"systems": "systems_2",
"systems": "systems_3",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
@@ -529,6 +591,21 @@
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {

View File

@@ -54,6 +54,13 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# Personal agent skills, packaged as per-skill derivations with a
# home-manager module that places them under Claude Code's skills directory.
skills = {
url = "git+https://git.alexion.dev/alexion/skills";
inputs.nixpkgs.follows = "nixpkgs";
};
# CachyOS kernel and binary cache. Pins its own nixpkgs so its cache stays
# usable and the kernel is fetched from it.
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";

15
modules/agent-skills.nix Normal file
View File

@@ -0,0 +1,15 @@
{ config, inputs, ... }:
# Global agent skills from the skills flake, placed under the agent harness's
# skills directory so they are active in every project. The flake's home-manager
# module self-gates on the harness being enabled and installs nothing for an
# empty selection, so a host without one carries no skills either way.
let
user = config.user.name;
# The skills installed globally, as derivations from the skills flake.
skills = [ ];
in
{
home-manager.sharedModules = [ inputs.skills.homeModules.default ];
home-manager.users.${user}.programs.agents.skills = skills;
}