fix avahi
This commit is contained in:
@@ -41,14 +41,14 @@ let
|
||||
) serviceNames;
|
||||
|
||||
hostedServicesByGroup = builtins.groupBy (svc: svc.hostedService.group) (
|
||||
builtins.filter (svc: svc.hostedService.enable) (
|
||||
builtins.filter (svc: svc.hostedService != null && svc.hostedService.enable) (
|
||||
builtins.map (
|
||||
serviceName:
|
||||
let
|
||||
serviceCfg = config.${namespace}.services.${serviceName};
|
||||
in
|
||||
{
|
||||
inherit (serviceCfg) hostedService;
|
||||
hostedService = serviceCfg.hostedService or null;
|
||||
}
|
||||
) (builtins.attrNames config.${namespace}.services)
|
||||
)
|
||||
@@ -349,16 +349,16 @@ let
|
||||
first-day-of-week = "sunday";
|
||||
}
|
||||
]
|
||||
++ (lib.mkIf cfg.weather.enable {
|
||||
++ lib.optional cfg.weather.enable {
|
||||
type = "weather";
|
||||
units = cfg.weather.units;
|
||||
hour-format = cfg.weather.hour-format;
|
||||
location = cfg.weather.location;
|
||||
})
|
||||
++ (lib.mkIf (cfg.servers != [ ]) {
|
||||
}
|
||||
++ lib.optional (cfg.servers != [ ]) {
|
||||
type = "server-stats";
|
||||
servers = cfg.servers;
|
||||
});
|
||||
};
|
||||
}
|
||||
{
|
||||
size = "full";
|
||||
@@ -370,7 +370,7 @@ let
|
||||
bangs = cfg.search;
|
||||
}
|
||||
]
|
||||
++ (lib.mkIf cfg.hostedServiceGroups (
|
||||
++ lib.optionals cfg.hostedServiceGroups (
|
||||
builtins.map (
|
||||
groupName:
|
||||
makeMonitorWidget groupName (
|
||||
@@ -381,11 +381,11 @@ let
|
||||
}) (hostedServicesByGroup.${groupName} or [ ])
|
||||
)
|
||||
) (builtins.attrNames hostedServicesByGroup)
|
||||
))
|
||||
++ (lib.mkIf (!cfg.hostedServiceGroups && cfg.enableHostedServices) [
|
||||
)
|
||||
++ lib.optionals (!cfg.hostedServiceGroups && cfg.enableHostedServices) [
|
||||
(makeMonitorWidget "Services" hostedServiceSites)
|
||||
])
|
||||
++ (lib.mkIf (cfg.extraSites != [ ]) (
|
||||
]
|
||||
++ lib.optionals (cfg.extraSites != [ ]) (
|
||||
builtins.map (site: {
|
||||
type = "monitor";
|
||||
cache = "1m";
|
||||
@@ -401,17 +401,17 @@ let
|
||||
)
|
||||
];
|
||||
}) cfg.extraSites
|
||||
))
|
||||
++ (lib.mkIf (cfg.bookmarks != [ ]) {
|
||||
)
|
||||
++ lib.optional (cfg.bookmarks != [ ]) {
|
||||
type = "bookmarks";
|
||||
groups = cfg.bookmarks;
|
||||
})
|
||||
++ (lib.mkIf (cfg.reddit != [ ]) (
|
||||
}
|
||||
++ lib.optionals (cfg.reddit != [ ]) (
|
||||
builtins.map (subreddit: {
|
||||
type = "reddit";
|
||||
inherit subreddit;
|
||||
}) cfg.reddit
|
||||
));
|
||||
);
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user