motd more conditional

This commit is contained in:
2026-06-14 09:06:59 -05:00
parent f07bbbef01
commit 982d208b13
+4 -3
View File
@@ -6,7 +6,8 @@
}: let
inherit (lib) mkIf mkOption types filterAttrs mapAttrsToList;
cfg = config.homelab.motd;
homelab = lib.attrByPath ["homelab"] {} config;
gameservers = lib.attrByPath ["gameservers"] {} config;
# collect services to display
motd_list =
mapAttrsToList (_: v: v.motd)
@@ -16,7 +17,7 @@
&& v ? motd
&& v.motd != null
)
config.homelab);
homelab);
motd_gs_list = lib.concatLists (
mapAttrsToList (_: v: v.motd_gs)
@@ -26,7 +27,7 @@
&& v ? motd_gs
&& v.motd_gs != null
)
config.gameservers)
gameservers)
);
in {
options.homelab.motd = {