Change-Id: Iba6557cbf4e0001277bd996df59318b4308fc92e Reviewed-on: https://cl.tvl.fyi/c/depot/+/1510 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			670 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			670 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";
 | 
						|
      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";
 | 
						|
      };
 | 
						|
    };
 | 
						|
  };
 | 
						|
}
 |