2024-07-24 15:49:31 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: let
|
|
|
|
inherit (config.khepri) rwDataDir;
|
2024-02-28 14:11:41 -05:00
|
|
|
|
|
|
|
rwPath = rwDataDir + "/vaultwarden";
|
|
|
|
in {
|
2024-07-24 20:52:32 -04:00
|
|
|
khepri.compositions."vaultwarden" = {
|
|
|
|
networks.proxy_net = {external = true;};
|
2024-02-28 14:11:41 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
services = {
|
|
|
|
"public-vault" = {
|
|
|
|
image = import ./images/vaultwarden.nix pkgs;
|
|
|
|
restart = "always";
|
|
|
|
|
|
|
|
ports = ["8781:80"];
|
|
|
|
volumes = ["${rwPath}/public-data:/data"];
|
|
|
|
environment.WEBSOCKET_ENABLED = "true";
|
|
|
|
networks = ["proxy_net"];
|
|
|
|
};
|
2024-02-28 14:11:41 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
"private-vault" = {
|
|
|
|
image = import ./images/vaultwarden.nix pkgs;
|
|
|
|
restart = "always";
|
2024-02-28 14:11:41 -05:00
|
|
|
|
2024-07-24 20:52:32 -04:00
|
|
|
ports = ["8780:80"];
|
|
|
|
volumes = ["${rwPath}/private-data:/data"];
|
|
|
|
environment.WEBSOCKET_ENABLED = "true";
|
|
|
|
networks = ["proxy_net"];
|
|
|
|
};
|
2024-02-28 14:11:41 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|