fix avahi
This commit is contained in:
@@ -122,6 +122,14 @@ in
|
||||
network.wait-online.enable = false;
|
||||
};
|
||||
|
||||
# Restrict Avahi to the configured LAN interface when one is explicitly set.
|
||||
# This prevents Avahi from announcing on virtual/container interfaces (veth*,
|
||||
# podman0, virbr0, etc.) which causes hostname conflicts and suffix mangling
|
||||
# (e.g. "jallen-nas-4.local" instead of "jallen-nas.local").
|
||||
services.avahi = lib.mkIf (cfg.ipv4.interface != "") {
|
||||
allowInterfaces = [ cfg.ipv4.interface ];
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = lib.mkForce cfg.hostName;
|
||||
|
||||
|
||||
@@ -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