From fe50d92f8c76888512faa5433b9ff3395f0bdc38 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 23 Jan 2024 05:29:57 +0100 Subject: [PATCH] tsuki/vaultwarden: conditional config --- hosts/tsuki/services/vaultwarden.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hosts/tsuki/services/vaultwarden.nix b/hosts/tsuki/services/vaultwarden.nix index 6769876..61293fd 100644 --- a/hosts/tsuki/services/vaultwarden.nix +++ b/hosts/tsuki/services/vaultwarden.nix @@ -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 = [