modules: add actual, nqptp, and voidauth service modules
This commit is contained in:
32
modules/services/actual.nix
Normal file
32
modules/services/actual.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.actual;
|
||||
fqdn = "${cfg.subdomain}.${config.networking.domain}";
|
||||
in
|
||||
{
|
||||
options.services.actual = {
|
||||
subdomain = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
environmentFile = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
webserver = {
|
||||
enable = lib.mkDefault true;
|
||||
vHosts.${fqdn}.locations."/".proxyPort = cfg.settings.port;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.actual = {
|
||||
serviceConfig.EnvironmentFile = cfg.environmentFile;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user