tsuki/vaultwarden: conditional config

This commit is contained in:
Oystein Kristoffer Tveit 2024-01-23 05:29:57 +01:00
parent 3d2825d1ec
commit fe50d92f8c
Signed by: oysteikt
GPG Key ID: 9F2F7D8250F35146
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: let
{ config, pkgs, lib, ... }: let
cfg = config.services.vaultwarden;
in {
services.vaultwarden = {
@ -18,7 +18,7 @@ in {
};
};
systemd.services.vaultwarden = {
systemd.services.vaultwarden = lib.mkIf cfg.enable {
requires = [ "postgresql.service" ];
serviceConfig = {
@ -55,7 +55,7 @@ in {
};
};
services.postgresql = {
services.postgresql = lib.mkIf cfg.enable {
enable = true;
ensureDatabases = [ "vaultwarden" ];
ensureUsers = [