nix-dotfiles/hosts/tsuki/services/osuchan.nix

27 lines
685 B
Nix
Raw Normal View History

2024-01-23 05:24:47 +01:00
{ config, ... }:
2023-01-04 14:32:11 +01:00
{
sops = {
secrets = {
"osuchan/env/channel_access_token" = { };
"osuchan/env/channel_id" = { };
"osuchan/env/channel_secret" = { };
};
templates."osuchan.env" = {
restartUnits = [ "osuchan.service" ];
content = let
inherit (config.sops) placeholder;
in ''
CHANNEL_ACCESS_TOKEN=${placeholder."osuchan/env/channel_access_token"}
CHANNEL_ID=${placeholder."osuchan/env/channel_id"}
CHANNEL_SECRET=${placeholder."osuchan/env/channel_secret"}
'';
};
2024-01-23 05:24:47 +01:00
};
2023-01-04 14:32:11 +01:00
services.osuchan = {
enable = true;
port = 9283;
secretFile = config.sops.templates."osuchan.env".path;
2023-01-04 14:32:11 +01:00
};
}