mirror of
https://github.com/tuxdotrs/nix-config.git
synced 2026-09-19 16:49:04 +05:30
feat(services): add pangolin proxy configuration
This commit is contained in:
@@ -38,6 +38,12 @@
|
||||
default = false;
|
||||
description = "Whether to configure Nginx as a reverse proxy for Vaultwarden";
|
||||
};
|
||||
|
||||
configurePangolin = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to configure Pangolin as a reverse proxy for Vaultwarden";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
@@ -73,6 +79,31 @@
|
||||
};
|
||||
};
|
||||
|
||||
newt.blueprint.proxy-resources = mkIf cfg.configurePangolin {
|
||||
vaultwarden = {
|
||||
auth = {
|
||||
sso-enabled = false;
|
||||
};
|
||||
full-domain = cfg.domain;
|
||||
name = "vaultwarden";
|
||||
protocol = "http";
|
||||
targets = [
|
||||
{
|
||||
hostname = "localhost";
|
||||
method = "http";
|
||||
port = cfg.port;
|
||||
healthcheck = {
|
||||
hostname = "localhost";
|
||||
port = cfg.port;
|
||||
scheme = "http";
|
||||
method = "GET";
|
||||
path = "/";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "vaultwarden" ];
|
||||
|
||||
Reference in New Issue
Block a user