2022-08-26 10:21:05 +00:00
|
|
|
{ pkgs, lib, config, ... }:
|
2021-11-15 10:02:05 +00:00
|
|
|
let
|
2023-11-16 00:00:11 +00:00
|
|
|
cfg = config.selfprivacy;
|
2021-11-15 10:02:05 +00:00
|
|
|
in
|
|
|
|
{
|
2022-08-26 10:21:05 +00:00
|
|
|
fileSystems = lib.mkIf cfg.useBinds {
|
|
|
|
"/var/lib/bitwarden" = {
|
|
|
|
device = "/volumes/${cfg.bitwarden.location}/bitwarden";
|
|
|
|
options = [ "bind" ];
|
|
|
|
};
|
|
|
|
"/var/lib/bitwarden_rs" = {
|
|
|
|
device = "/volumes/${cfg.bitwarden.location}/bitwarden_rs";
|
|
|
|
options = [ "bind" ];
|
|
|
|
};
|
|
|
|
};
|
2022-07-19 12:18:46 +00:00
|
|
|
services.vaultwarden = {
|
2021-11-15 10:02:05 +00:00
|
|
|
enable = cfg.bitwarden.enable;
|
|
|
|
dbBackend = "sqlite";
|
2021-11-17 08:54:36 +00:00
|
|
|
backupDir = "/var/lib/bitwarden/backup";
|
2023-05-14 14:22:09 +00:00
|
|
|
environmentFile = "/var/lib/bitwarden/.env";
|
2021-11-15 10:02:05 +00:00
|
|
|
config = {
|
|
|
|
domain = "https://password.${cfg.domain}/";
|
|
|
|
signupsAllowed = true;
|
|
|
|
rocketPort = 8222;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|