tsuki/vaultwarden: use socket activation
This commit is contained in:
parent
caedfe1810
commit
aca2962eec
|
@ -57,7 +57,7 @@
|
||||||
"pgadmin".servers."unix:${srv.uwsgi.instance.vassals.pgadmin.socket}" = { };
|
"pgadmin".servers."unix:${srv.uwsgi.instance.vassals.pgadmin.socket}" = { };
|
||||||
"plex".servers."localhost:${s ports.plex}" = { };
|
"plex".servers."localhost:${s ports.plex}" = { };
|
||||||
"proxmox".servers."${ips.px1}:${s ports.proxmox}" = { };
|
"proxmox".servers."${ips.px1}:${s ports.proxmox}" = { };
|
||||||
"vaultwarden".servers."localhost:${s srv.vaultwarden.config.ROCKET_PORT}" = { };
|
"vaultwarden".servers."unix:${sa.vaultwarden.newSocketAddress}" = { };
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts = let
|
virtualHosts = let
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{ pkgs, config, ... }:
|
{ config, pkgs, ... }: let
|
||||||
{
|
cfg = config.services.vaultwarden;
|
||||||
|
in {
|
||||||
services.vaultwarden = {
|
services.vaultwarden = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dbBackend = "postgresql";
|
dbBackend = "postgresql";
|
||||||
|
@ -66,4 +67,11 @@
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
local.socketActivation.vaultwarden = {
|
||||||
|
enable = cfg.enable;
|
||||||
|
originalSocketAddress = "${cfg.config.ROCKET_ADDRESS}:${toString cfg.config.ROCKET_PORT}";
|
||||||
|
newSocketAddress = "/run/vaultwarden.sock";
|
||||||
|
privateNamespace = false;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue