diff options
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"; + }; + }; + }; +} |