b35e358eb5
Previously the depot argument was provided as config.depot, but the "new way" of doing things (which is more like the args list provided in the rest of the depot) is to provide this as the "depot" NixOS module argument instead. Change-Id: Ib48b1c7c1bdff9c1eb0618c6cbacc22b651f5f98 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2763 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in> Reviewed-by: glittershark <grfn@gws.fyi>
27 lines
698 B
Nix
27 lines
698 B
Nix
{ depot, 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 = "${depot.fun.paroxysm}/bin/paroxysm";
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
environment = {
|
|
PARX_DATABASE_URL = "postgresql://tvldb:tvldb@localhost/tvldb";
|
|
PARX_IRC_CONFIG_PATH = "/var/lib/paroxysm/irc.toml";
|
|
};
|
|
|
|
serviceConfig = {
|
|
DynamicUser = true;
|
|
StateDirectory = "paroxysm";
|
|
Restart = "always";
|
|
};
|
|
};
|
|
};
|
|
}
|