f41324db8c
Change-Id: I415e3b046d4e0fcd7e800ddab0c7f1aeb639c5e2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1502 Tested-by: BuildkiteCI Reviewed-by: eta <eta@theta.eu.org>
25 lines
628 B
Nix
25 lines
628 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let
|
|
cfg = config.services.depot.paroxysm;
|
|
description = "TVL's majestic IRC bot";
|
|
in {
|
|
options.services.depot.paroxysm.enable = lib.mkEnableOption description;
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
systemd.services.paroxysm = {
|
|
inherit description;
|
|
script = "${config.depot.fun.paroxysm}/bin/paroxysm";
|
|
|
|
environment = {
|
|
PARX_DATABASE_URL = "postgresql://tvldb:tvldb@localhost/tvldb";
|
|
PARX_IRC_CONFIG_PATH = "/var/lib/paroxysm/irc.toml";
|
|
};
|
|
|
|
serviceConfig = {
|
|
DynamicUser = true;
|
|
StateDirectory = "paroxysm";
|
|
};
|
|
};
|
|
};
|
|
}
|