mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-config.git
synced 2024-11-22 11:41:26 +00:00
28 lines
691 B
Nix
28 lines
691 B
Nix
{ pkgs, lib, config, ... }:
|
|
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 = {
|
|
enable = cfg.bitwarden.enable;
|
|
dbBackend = "sqlite";
|
|
backupDir = "/var/lib/bitwarden/backup";
|
|
environmentFile = "/var/lib/bitwarden/.env";
|
|
config = {
|
|
domain = "https://password.${cfg.domain}/";
|
|
signupsAllowed = true;
|
|
rocketPort = 8222;
|
|
};
|
|
};
|
|
}
|