summaryrefslogtreecommitdiffstats
path: root/configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-20 02:35:23 +0000
committertv <tv@krebsco.de>2026-11-20 03:40:19 +0100
commit52892ca231b79eb09fd0270591d56f75e8e65d49 (patch)
tree5e75d7268b2dca881a01acfd7e1fcb346f5fcdc8 /configs
parent7af871c5d834acb1734e5089ca005193699b1283 (diff)
configs/hermes: keep perl out of the closure
profiles/perlless forbids perl in the system closure, and hermes-agent brought it in twice: nixpkgs' git (send-email, gitweb & co.), on the package's runtime PATH and the module's unit PATH, and wl-clipboard, whose xdg-utils needs perl. Override the package with gitMinimal and without wl-clipboard, which has no use without Wayland, and replace the unit's PATH, as the package brings git itself.
Diffstat (limited to 'configs')
-rw-r--r--configs/hermes.nix14
1 files changed, 14 insertions, 0 deletions
diff --git a/configs/hermes.nix b/configs/hermes.nix
index ea1fd9b..66b1094 100644
--- a/configs/hermes.nix
+++ b/configs/hermes.nix
@@ -61,6 +61,13 @@ in
services.hermes-agent = {
enable = true;
+ # Without perl, as profiles/perlless forbids it in the closure: git
+ # without send-email & co., and no wl-clipboard, whose xdg-utils needs
+ # perl, and which is no use here anyway.
+ package = hermes-agent.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
+ git = pkgs.gitMinimal;
+ wl-clipboard = pkgs.emptyDirectory;
+ };
# /var is a tmpfs. This is on the only drive that can outlive a boot,
# like nix's database, see /nix/var.
stateDir = "/nix/.rw-store/hermes";
@@ -93,6 +100,13 @@ in
if [ "$USER" = root ] && [ -z "$TMUX" ]; then ${tmux} attach -t hermes; fi
'';
+ # The module adds pkgs.git, which needs perl; the package has gitMinimal.
+ systemd.services.hermes-agent.path = lib.mkForce [
+ config.services.hermes-agent.package
+ pkgs.bash
+ pkgs.coreutils
+ ];
+
# nixos-init doesn't run activation scripts, and that's where the module
# creates the state and installs config.yaml and .env.
systemd.services.hermes-agent-setup = {