modules/systemd-extras: support chants

This commit is contained in:
Max Headroom 2024-07-10 14:00:00 +02:00
parent bffd063523
commit 5f3661d06a
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,19 @@
{ lib, ... }:
with lib;
{
options.systemd.services = mkOption {
type = with types; attrsOf (submodule ({ config, name, ... }: {
options.chant = {
enable = mkEnableOption "listening for a waking chant";
};
config = lib.mkIf config.chant.enable {
serviceConfig = {
Type = "oneshot";
LoadCredential = [ "chantPayload:/run/chant/${name}" ];
};
environment.CHANT_PAYLOAD = "%d/chantPayload";
};
}));
};
}

View file

@ -2,5 +2,6 @@
imports = [
./strict-mounts.nix
./distributed.nix
./chant.nix
];
}