selfprivacy-nixos-config/passmgr/bitwarden.nix

28 lines
691 B
Nix
Raw Normal View History

{ pkgs, lib, config, ... }:
2021-11-15 12:02:05 +02:00
let
cfg = config.services.userdata;
in
{
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" ];
};
};
services.vaultwarden = {
2021-11-15 12:02:05 +02:00
enable = cfg.bitwarden.enable;
dbBackend = "sqlite";
backupDir = "/var/lib/bitwarden/backup";
2023-05-14 17:22:09 +03:00
environmentFile = "/var/lib/bitwarden/.env";
2021-11-15 12:02:05 +02:00
config = {
domain = "https://password.${cfg.domain}/";
signupsAllowed = true;
rocketPort = 8222;
};
};
}