feat(services): add hermes-agent nixos module

This commit is contained in:
tux
2026-08-12 20:51:07 +05:30
parent a522f73de5
commit c0a6af4e97
3 changed files with 249 additions and 53 deletions

263
flake.lock generated
View File

@@ -351,7 +351,10 @@
}, },
"flake-parts_2": { "flake-parts_2": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": [
"hermes-agent",
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1782949081, "lastModified": 1782949081,
@@ -369,7 +372,7 @@
}, },
"flake-parts_3": { "flake-parts_3": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib_2" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1782949081, "lastModified": 1782949081,
@@ -386,6 +389,24 @@
} }
}, },
"flake-parts_4": { "flake-parts_4": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1782949081,
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_5": {
"inputs": { "inputs": {
"nixpkgs-lib": [ "nixpkgs-lib": [
"nur", "nur",
@@ -536,6 +557,29 @@
"type": "github" "type": "github"
} }
}, },
"hermes-agent": {
"inputs": {
"flake-parts": "flake-parts_2",
"nixpkgs": "nixpkgs_6",
"npm-lockfile-fix": "npm-lockfile-fix",
"pyproject-build-systems": "pyproject-build-systems",
"pyproject-nix": "pyproject-nix",
"uv2nix": "uv2nix"
},
"locked": {
"lastModified": 1786536754,
"narHash": "sha256-d5SPLt78Y3/cEoj4GaKxM4lUtokX6T+xSsaVjwCZfsY=",
"owner": "NousResearch",
"repo": "hermes-agent",
"rev": "222465d84709379b65173b0283a6eea87516acfa",
"type": "github"
},
"original": {
"owner": "NousResearch",
"repo": "hermes-agent",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -646,7 +690,7 @@
"hyprutils": "hyprutils", "hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner", "hyprwayland-scanner": "hyprwayland-scanner",
"hyprwire": "hyprwire", "hyprwire": "hyprwire",
"nixpkgs": "nixpkgs_6", "nixpkgs": "nixpkgs_7",
"pre-commit-hooks": "pre-commit-hooks", "pre-commit-hooks": "pre-commit-hooks",
"systems": "systems_2", "systems": "systems_2",
"xdph": "xdph" "xdph": "xdph"
@@ -899,7 +943,7 @@
"impermanence": { "impermanence": {
"inputs": { "inputs": {
"home-manager": "home-manager_2", "home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_7" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1769548169, "lastModified": 1769548169,
@@ -932,7 +976,7 @@
}, },
"lan-mouse": { "lan-mouse": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_8", "nixpkgs": "nixpkgs_9",
"rust-overlay": "rust-overlay_2" "rust-overlay": "rust-overlay_2"
}, },
"locked": { "locked": {
@@ -952,7 +996,7 @@
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "crane": "crane",
"nixpkgs": "nixpkgs_9", "nixpkgs": "nixpkgs_10",
"pre-commit": "pre-commit", "pre-commit": "pre-commit",
"rust-overlay": "rust-overlay_3" "rust-overlay": "rust-overlay_3"
}, },
@@ -990,7 +1034,7 @@
}, },
"mango": { "mango": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_2", "flake-parts": "flake-parts_3",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
@@ -1086,8 +1130,8 @@
}, },
"nixcord": { "nixcord": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_3", "flake-parts": "flake-parts_4",
"nixpkgs": "nixpkgs_10", "nixpkgs": "nixpkgs_11",
"nixpkgs-nixcord": "nixpkgs-nixcord", "nixpkgs-nixcord": "nixpkgs-nixcord",
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
@@ -1107,7 +1151,7 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_11" "nixpkgs": "nixpkgs_12"
}, },
"locked": { "locked": {
"lastModified": 1785232496, "lastModified": 1785232496,
@@ -1235,6 +1279,22 @@
} }
}, },
"nixpkgs_10": { "nixpkgs_10": {
"locked": {
"lastModified": 1781577229,
"narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "567a49d1913ce81ac6e9582e3553dd90a955875f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_11": {
"locked": { "locked": {
"lastModified": 1785386831, "lastModified": 1785386831,
"narHash": "sha256-sPS3CaXH8RAT3FZRuy4VcV47iuYIWMMfa0GbyJKC3o4=", "narHash": "sha256-sPS3CaXH8RAT3FZRuy4VcV47iuYIWMMfa0GbyJKC3o4=",
@@ -1250,7 +1310,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_11": { "nixpkgs_12": {
"locked": { "locked": {
"lastModified": 1767892417, "lastModified": 1767892417,
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=", "narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=",
@@ -1263,39 +1323,39 @@
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" "url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz"
} }
}, },
"nixpkgs_12": {
"locked": {
"lastModified": 1786247143,
"narHash": "sha256-8S3Kcxs7D4UtxJxSJZz0m14CGhuW0MxfrIwJxeGWGnQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "279b4a8275f032c566576b3f181fa0f27197f588",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_13": { "nixpkgs_13": {
"locked": { "locked": {
"lastModified": 1786247143, "lastModified": 1786247143,
"narHash": "sha256-8S3Kcxs7D4UtxJxSJZz0m14CGhuW0MxfrIwJxeGWGnQ=", "narHash": "sha256-8S3Kcxs7D4UtxJxSJZz0m14CGhuW0MxfrIwJxeGWGnQ=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "279b4a8275f032c566576b3f181fa0f27197f588", "rev": "279b4a8275f032c566576b3f181fa0f27197f588",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_14": { "nixpkgs_14": {
"locked": {
"lastModified": 1786247143,
"narHash": "sha256-8S3Kcxs7D4UtxJxSJZz0m14CGhuW0MxfrIwJxeGWGnQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "279b4a8275f032c566576b3f181fa0f27197f588",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_15": {
"locked": { "locked": {
"lastModified": 1782175435, "lastModified": 1782175435,
"narHash": "sha256-EMzXKmnOtBQ2MnvpiNOm7E+kOMvdPrIKaeg52Tip2Uk=", "narHash": "sha256-EMzXKmnOtBQ2MnvpiNOm7E+kOMvdPrIKaeg52Tip2Uk=",
@@ -1311,7 +1371,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_15": { "nixpkgs_16": {
"locked": { "locked": {
"lastModified": 1770107345, "lastModified": 1770107345,
"narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=", "narHash": "sha256-tbS0Ebx2PiA1FRW8mt8oejR0qMXmziJmPaU1d4kYY9g=",
@@ -1391,6 +1451,22 @@
} }
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": {
"lastModified": 1785318670,
"narHash": "sha256-dN6Ou5x/+23FZLEpYP3IffO+NyJFzUlGumt1uu3MMaY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0954f7ee2f6bb3dc7d4e3d0d8bcb8fd4bde4cfc5",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1786106723, "lastModified": 1786106723,
"narHash": "sha256-zDSUbpoeo/9ZmD2+wXnzxoo1+uhL8vxc0b8yuYMKYq0=", "narHash": "sha256-zDSUbpoeo/9ZmD2+wXnzxoo1+uhL8vxc0b8yuYMKYq0=",
@@ -1406,7 +1482,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_7": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1768564909, "lastModified": 1768564909,
"narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=",
@@ -1422,7 +1498,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_8": { "nixpkgs_9": {
"locked": { "locked": {
"lastModified": 1772963539, "lastModified": 1772963539,
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=", "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
@@ -1438,22 +1514,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": {
"locked": {
"lastModified": 1781577229,
"narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "567a49d1913ce81ac6e9582e3553dd90a955875f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nmd": { "nmd": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -1492,10 +1552,31 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"npm-lockfile-fix": {
"inputs": {
"nixpkgs": [
"hermes-agent",
"nixpkgs"
]
},
"locked": {
"lastModified": 1775903712,
"narHash": "sha256-2GV79U6iVH4gKAPWYrxUReB0S41ty/Y3dBLquU8AlaA=",
"owner": "jeslie0",
"repo": "npm-lockfile-fix",
"rev": "c6093acb0c0548e0f9b8b3d82918823721930fe8",
"type": "github"
},
"original": {
"owner": "jeslie0",
"repo": "npm-lockfile-fix",
"type": "github"
}
},
"nur": { "nur": {
"inputs": { "inputs": {
"flake-parts": "flake-parts_4", "flake-parts": "flake-parts_5",
"nixpkgs": "nixpkgs_13" "nixpkgs": "nixpkgs_14"
}, },
"locked": { "locked": {
"lastModified": 1786434255, "lastModified": 1786434255,
@@ -1556,6 +1637,56 @@
"type": "github" "type": "github"
} }
}, },
"pyproject-build-systems": {
"inputs": {
"nixpkgs": [
"hermes-agent",
"nixpkgs"
],
"pyproject-nix": [
"hermes-agent",
"pyproject-nix"
],
"uv2nix": [
"hermes-agent",
"uv2nix"
]
},
"locked": {
"lastModified": 1785115949,
"narHash": "sha256-8AM37BfyGaL2v/SZyg4PupRxJ01Y4htvM+WrTjWrPpo=",
"owner": "pyproject-nix",
"repo": "build-system-pkgs",
"rev": "62c0d86027edb1c4f39a5facc09876348144f7c9",
"type": "github"
},
"original": {
"owner": "pyproject-nix",
"repo": "build-system-pkgs",
"type": "github"
}
},
"pyproject-nix": {
"inputs": {
"nixpkgs": [
"hermes-agent",
"nixpkgs"
]
},
"locked": {
"lastModified": 1784591072,
"narHash": "sha256-zP/WaDxrRu8GANZM61+V2LT/7ycEEdoyLWn7M6WzU7M=",
"owner": "pyproject-nix",
"repo": "pyproject.nix",
"rev": "e3b599ca2e7fcf93d4edf65d7f19bbf6491724f3",
"type": "github"
},
"original": {
"owner": "pyproject-nix",
"repo": "pyproject.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"awww": "awww", "awww": "awww",
@@ -1565,6 +1696,7 @@
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"disko": "disko", "disko": "disko",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"hermes-agent": "hermes-agent",
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"impermanence": "impermanence", "impermanence": "impermanence",
@@ -1576,7 +1708,7 @@
"nix-on-droid": "nix-on-droid", "nix-on-droid": "nix-on-droid",
"nixcord": "nixcord", "nixcord": "nixcord",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_12", "nixpkgs": "nixpkgs_13",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nur": "nur", "nur": "nur",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
@@ -1729,7 +1861,7 @@
}, },
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_14" "nixpkgs": "nixpkgs_15"
}, },
"locked": { "locked": {
"lastModified": 1786375908, "lastModified": 1786375908,
@@ -1884,7 +2016,7 @@
}, },
"treefmt-nix_2": { "treefmt-nix_2": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_15" "nixpkgs": "nixpkgs_16"
}, },
"locked": { "locked": {
"lastModified": 1785945821, "lastModified": 1785945821,
@@ -1918,6 +2050,31 @@
"type": "github" "type": "github"
} }
}, },
"uv2nix": {
"inputs": {
"nixpkgs": [
"hermes-agent",
"nixpkgs"
],
"pyproject-nix": [
"hermes-agent",
"pyproject-nix"
]
},
"locked": {
"lastModified": 1785277507,
"narHash": "sha256-9Tq3UDX2hD/aveW/HvkBlAmEwJTOlY5HQXJM+L5BGmE=",
"owner": "pyproject-nix",
"repo": "uv2nix",
"rev": "5a836d395cbf5fc22670eb98dd4aa4fc4d406977",
"type": "github"
},
"original": {
"owner": "pyproject-nix",
"repo": "uv2nix",
"type": "github"
}
},
"vicinae": { "vicinae": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [

View File

@@ -82,5 +82,6 @@
nur.url = "github:nix-community/nur"; nur.url = "github:nix-community/nur";
lanzaboote.url = "github:nix-community/lanzaboote/v1.1.0"; lanzaboote.url = "github:nix-community/lanzaboote/v1.1.0";
copyparty.url = "github:9001/copyparty"; copyparty.url = "github:9001/copyparty";
hermes-agent.url = "github:NousResearch/hermes-agent";
}; };
} }

View File

@@ -0,0 +1,38 @@
{ inputs, ... }: {
flake.modules.nixos.services =
{
config,
lib,
options,
userName,
...
}:
with lib;
let
cfg = config.tnix.services.hermes-agent;
in
{
imports = [
inputs.hermes-agent.nixosModules.default
];
options.tnix.services.hermes-agent = {
enable = mkEnableOption "Hermes Agent";
environmentFiles = options.services.hermes-agent.environmentFiles;
};
config = mkIf cfg.enable {
services.hermes-agent = {
enable = true;
settings.model = {
provider = "opencode-go";
default = "deepseek-v4-flash";
};
environmentFiles = cfg.environmentFiles;
addToSystemPackages = true;
};
users.users.${userName}.extraGroups = [ "hermes" ];
};
};
}