clan: init vaultwarden service
This commit is contained in:
parent
3bcd5df16e
commit
f07e337a51
2 changed files with 35 additions and 0 deletions
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
33
clanServices/vaultwarden.nix
Normal file
33
clanServices/vaultwarden.nix
Normal 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" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue