-[Draupnir](https://github.com/the-draupnir-project/draupnir), a Matrix moderation bot. Available as [services.draupnir](#opt-services.draupnir.enable).
-[Pangolin](https://github.com/fosrl/pangolin), a tunneled reverse proxy server with access control. Available as [services.pangolin](#opt-services.pangolin.enable).
-[postfix-tlspol](https://github.com/Zuplu/postfix-tlspol), MTA-STS and DANE resolver and TLS policy server for Postfix. Available as [services.postfix-tlspol](#opt-services.postfix-tlspol.enable).
-[crowdsec](https://www.crowdsec.net/), a free, open-source and collaborative IPS. Available as [services.crowdsec](#opt-services.crowdsec.enable).
The domain where the application will be hosted. This is used for many things, including generating links. You can run Pangolin on a subdomain or root domain. Do not prefix with `http` or `https`.
An email address for SSL certificate registration with Let's Encrypt. This should be an email you have access to.
'';
};
# this assumes that all domains are hosted by the same provider
dnsProvider=lib.mkOption{
type=nullOrOptlib.types.str;
default=null;
description=''
The DNS provider Traefik will request wildcard certificates from. See the [Traefik Documentation](https://doc.traefik.io/traefik/https/acme/#providers) for more information.
'';
};
# provide path to file to keep secrets out of the nix store
environmentFile=lib.mkOption{
type=withlib.types;nullOrpath;
default=null;
description=''
Path to a file containing sensitive environment variables for Pangolin. See the [Pangolin Documentation](https://docs.fossorial.io/Pangolin/Configuration/config) for more information.
These will overwrite anything defined in the config.
The file should contain environment-variable assignments like:
```
SERVER_SECRET=1234567890abc
```
'';
example="/etc/nixos/secrets/pangolin.env";
};
dataDir=lib.mkOption{
type=lib.types.str;
default="/var/lib/pangolin";
example="/srv/pangolin";
description="Path to variable state data directory for Pangolin.";
};
};
gerbil={
port=lib.mkOption{
type=lib.types.port;
default=3003;
description=''
Specifies the port to listen on for Gerbil.
'';
};
environmentFile=lib.mkOption{
type=nullOrOptlib.types.path;
default=null;
description=''
Path to a file containing sensitive environment variables for Gerbil. See the [Gerbil Documentation](https://docs.fossorial.io/Pangolin/Configuration/config) for more information.
These will overwrite anything defined in the config.
'';
example="/etc/nixos/secrets/gerbil.env";
};
};
};
config=lib.mkIfcfg.enable{
assertions=
(lib.mapAttrsToList(name:value:{
# check if the value is optional by looking at the type