Add vaultwarden service
This commit is contained in:
parent
3e9dafde76
commit
2918c6fd89
6 changed files with 74 additions and 30 deletions
28
services/vaultwarden/default.nix
Normal file
28
services/vaultwarden/default.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
cfg = config.services.vm_vaultwarden;
|
||||
in {
|
||||
options.services.vm_vaultwarden = {
|
||||
enable = lib.mkEnableOption "Enable minimal config";
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
age.secrets.env-file = {
|
||||
file = ./secrets/env-file.age;
|
||||
};
|
||||
services = {
|
||||
vaultwarden = {
|
||||
enable = true;
|
||||
dbBackend = "postgresql";
|
||||
environmentFile = config.age.secrets.env-file.path;
|
||||
config = {
|
||||
DOMAIN = "https://vault.le43.eu";
|
||||
SIGNUPS_ALLOWED = false;
|
||||
IP_HEADER = "X-Forwarded-For";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue