clan: init vaultwarden service

This commit is contained in:
Romain Paquet 2026-02-24 17:53:46 +01:00
parent 3bcd5df16e
commit f07e337a51
2 changed files with 35 additions and 0 deletions

View file

@ -4,4 +4,6 @@
./coredns/flake-module.nix ./coredns/flake-module.nix
./prometheus/flake-module.nix ./prometheus/flake-module.nix
]; ];
clan.modules."@rpqt/vaultwarden" = ./vaultwarden.nix;
} }

View file

@ -0,0 +1,33 @@
{
_class = "clan.service";
manifest.name = "vaultwarden";
manifest.description = "Bitwarden-compatible password manager";
manifest.exports.out = [ "endpoints" ];
roles.default = {
perInstance =
{
meta,
mkExports,
...
}:
let
host = "vaultwarden.${meta.domain}";
in
{
exports = mkExports {
endpoints.hosts = [ host ];
};
nixosModule = {
services.vaultwarden = {
enable = true;
domain = host;
configureNginx = true;
};
clan.core.state.vaultwarden.folders = [ "/var/lib/vaultwarden" ];
};
};
};
}