+ portUtils +metabase
This commit is contained in:
@@ -1,30 +1,37 @@
|
||||
{config, ...}: {
|
||||
services.vaultwarden = {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
serviceName = "vaultwarden";
|
||||
portUtils = import ../../../lib/port-utils.nix {inherit lib;};
|
||||
servicePort = portUtils.getPort serviceName "AZ-CLD-1";
|
||||
in {
|
||||
services.${serviceName} = {
|
||||
enable = true;
|
||||
dbBackend = "postgresql";
|
||||
config = {
|
||||
ROCKET_ADDRESS = "127.0.0.1";
|
||||
ROCKET_PORT = 3032;
|
||||
ROCKET_PORT = servicePort;
|
||||
};
|
||||
environmentFile = "${config.age.secrets.vaultwarden-env.path}";
|
||||
environmentFile = config.age.secrets.vaultwarden-env.path;
|
||||
};
|
||||
|
||||
# Traefik configuration for headscale
|
||||
# Traefik configuration
|
||||
services.traefik.dynamicConfigOptions.http = {
|
||||
services.vaultwarden.loadBalancer.servers = [
|
||||
services.${serviceName}.loadBalancer.servers = [
|
||||
{
|
||||
url = "http://localhost:3032/";
|
||||
url = "http://localhost:${toString servicePort}/";
|
||||
}
|
||||
];
|
||||
|
||||
routers.vaultwarden = {
|
||||
routers.${serviceName} = {
|
||||
rule = "Host(`pw.az-gruppe.com`)";
|
||||
tls = {
|
||||
certResolver = "ionos";
|
||||
};
|
||||
service = "vaultwarden";
|
||||
service = serviceName;
|
||||
entrypoints = "websecure";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user