From 132e6cff86be91d544cd49d9208128010fd75156 Mon Sep 17 00:00:00 2001 From: ibizaman Date: Sat, 28 Jan 2023 16:01:04 -0800 Subject: [PATCH] merge files for vaultwarden --- ttrss/default.nix | 44 +++++++++++++++++------------------------ vaultwarden/default.nix | 12 +++++++++++ 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/ttrss/default.nix b/ttrss/default.nix index 7ae62cb..8af77dc 100644 --- a/ttrss/default.nix +++ b/ttrss/default.nix @@ -1,6 +1,6 @@ -{ pkgs +{ customPkgs +, pkgs , utils -, customPkgs }: { serviceName ? "Ttrss" , siteName ? "ttrss" @@ -28,14 +28,6 @@ with pkgs.lib.attrsets; let - mkServices = services: listToAttrs (map ( - x: nameValuePair x.name x - ) services); - - mkDistribution = services: on: listToAttrs (map ( - x: nameValuePair x.name on - ) services); - rtdir = "/run/ttrss"; lock_directory = "${rtdir}/lock"; cache_directory = "${rtdir}/cache"; @@ -191,23 +183,23 @@ rec { }; }; - services = mkServices [ - db - config - dbupgrade - service - phpfpmService - updateService - ]; + services = { + ${db.name} = db; + ${config.name} = config; + ${dbupgrade.name} = dbupgrade; + ${service.name} = service; + ${phpfpmService.name} = phpfpmService; + ${updateService.name} = updateService; + }; - distribute = mkDistribution [ - db - config - dbupgrade - service - phpfpmService - updateService - ]; + distribute = on: { + ${db.name} = on; + ${config.name} = on; + ${dbupgrade.name} = on; + ${service.name} = on; + ${phpfpmService.name} = on; + ${updateService.name} = on; + }; directories_modes = { "${rtdir}" = "0550"; diff --git a/vaultwarden/default.nix b/vaultwarden/default.nix index 13cfa25..e2a71ac 100644 --- a/vaultwarden/default.nix +++ b/vaultwarden/default.nix @@ -173,4 +173,16 @@ rec { }; }; }; + + services = { + ${db.name} = db; + ${web.name} = web; + ${service.name} = service; + }; + + distribute = on: { + ${db.name} = on; + ${web.name} = on; + ${service.name} = on; + }; }