diff options
author | Vincent Ambo <mail@tazj.in> | 2020-07-31T21·30+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-07-31T21·58+0000 |
commit | f41324db8c6e40a23ac4575bf2b0f11ca38a9b65 (patch) | |
tree | 0fbe93c79aabadcd3402cc8ebcf72164447f4de7 /ops/nixos/paroxysm.nix | |
parent | d671195c3bcc444a317162e5b4284d24e376765c (diff) |
feat(ops/nixos): Add module for running paroxysm on whitby r/1513
Change-Id: I415e3b046d4e0fcd7e800ddab0c7f1aeb639c5e2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1502 Tested-by: BuildkiteCI Reviewed-by: eta <eta@theta.eu.org>
Diffstat (limited to 'ops/nixos/paroxysm.nix')
-rw-r--r-- | ops/nixos/paroxysm.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ops/nixos/paroxysm.nix b/ops/nixos/paroxysm.nix new file mode 100644 index 000000000000..faf61f77a07d --- /dev/null +++ b/ops/nixos/paroxysm.nix @@ -0,0 +1,25 @@ +{ 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"; + }; + }; + }; +} |