Compare commits

..

No commits in common. "286388294db4eb815d52898f913c8ec6587c5105" and "2f11b4eec2b472ac8d4ba43f899980101434fc5f" have entirely different histories.

2 changed files with 9 additions and 24 deletions

View file

@ -78,12 +78,7 @@ in
dnsServers = lib.mkOption {
type = lib.types.listOf lib.types.nonEmptyStr;
default =
{
"client" = if (blocking-nameservers != [ ]) then blocking-nameservers else recursive-nameservers;
"server" = recursive-nameservers;
}
.${cfg.role};
default = if (blocking-nameservers != [ ]) then blocking-nameservers else recursive-nameservers;
};
implementation = lib.mkOption {

View file

@ -8,9 +8,6 @@
let
cfg = config.custom.web-services.glance;
perHostDomains =
perHostSitesWidget.widgets |> lib.concatMap (widget: widget.sites) |> lib.map (site: site.domain);
perHostSitesWidget =
allHosts
|> lib.attrValues
@ -21,7 +18,8 @@ let
sites =
host.config.custom.meta.sites
|> lib.attrValues
|> lib.filter (site: site.domain |> lib.hasSuffix host.config.custom.networking.overlay.fqdn);
|> lib.filter (site: site.domain |> lib.hasSuffix host.config.custom.networking.overlay.fqdn)
|> lib.map (site: site // { timeout = "5s"; });
})
|> lib.filter ({ sites, ... }: sites != [ ])
|> (widgets: {
@ -30,6 +28,9 @@ let
inherit widgets;
});
perHostDomains =
perHostSitesWidget.widgets |> lib.concatMap (widget: widget.sites) |> lib.map (site: site.domain);
applicationSitesWidget =
allHosts
|> lib.attrValues
@ -44,7 +45,7 @@ let
type = "monitor";
cache = "1m";
title = "${name} Services";
sites = value;
sites = value |> lib.map (site: site // { timeout = "5s"; });
}
)
|> (widgets: {
@ -91,17 +92,6 @@ let
</div>
'';
};
dnsWidgets =
allHosts
|> lib.attrValues
|> lib.filter (host: host.config.custom.services.blocking-nameserver.enable)
|> lib.map (host: {
type = "dns-stats";
title = host.config.networking.hostName;
service = "adguard";
url = "https://${host.config.custom.services.blocking-nameserver.gui.domain}/";
});
in
{
options.custom.web-services.glance = {
@ -134,7 +124,7 @@ in
{
type = "search";
search-engine = "https://search.splitleaf.de/search?q={QUERY}";
autofocus = true;
autofocus = false;
}
applicationSitesWidget
perHostSitesWidget
@ -142,7 +132,7 @@ in
}
{
size = "small";
widgets = [ githubBadgeWidget ] ++ dnsWidgets;
widgets = [ githubBadgeWidget ];
}
];
};