nixos-configs/devices/nos/modules/docker/vaultwarden/compose.nix

36 lines
793 B
Nix
Raw Permalink Normal View History

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 {
khepri.compositions."vaultwarden" = {
networks.proxy_net = {external = true;};
2024-02-28 14:11:41 -05: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
"private-vault" = {
image = import ./images/vaultwarden.nix pkgs;
restart = "always";
2024-02-28 14:11:41 -05:00
ports = ["8780:80"];
volumes = ["${rwPath}/private-data:/data"];
environment.WEBSOCKET_ENABLED = "true";
networks = ["proxy_net"];
};
2024-02-28 14:11:41 -05:00
};
};
}