mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 23:29:08 +01:00
Compare commits
No commits in common. "286388294db4eb815d52898f913c8ec6587c5105" and "2f11b4eec2b472ac8d4ba43f899980101434fc5f" have entirely different histories.
286388294d
...
2f11b4eec2
2 changed files with 9 additions and 24 deletions
|
|
@ -78,12 +78,7 @@ in
|
||||||
|
|
||||||
dnsServers = lib.mkOption {
|
dnsServers = lib.mkOption {
|
||||||
type = lib.types.listOf lib.types.nonEmptyStr;
|
type = lib.types.listOf lib.types.nonEmptyStr;
|
||||||
default =
|
default = if (blocking-nameservers != [ ]) then blocking-nameservers else recursive-nameservers;
|
||||||
{
|
|
||||||
"client" = if (blocking-nameservers != [ ]) then blocking-nameservers else recursive-nameservers;
|
|
||||||
"server" = recursive-nameservers;
|
|
||||||
}
|
|
||||||
.${cfg.role};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
implementation = lib.mkOption {
|
implementation = lib.mkOption {
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,6 @@
|
||||||
let
|
let
|
||||||
cfg = config.custom.web-services.glance;
|
cfg = config.custom.web-services.glance;
|
||||||
|
|
||||||
perHostDomains =
|
|
||||||
perHostSitesWidget.widgets |> lib.concatMap (widget: widget.sites) |> lib.map (site: site.domain);
|
|
||||||
|
|
||||||
perHostSitesWidget =
|
perHostSitesWidget =
|
||||||
allHosts
|
allHosts
|
||||||
|> lib.attrValues
|
|> lib.attrValues
|
||||||
|
|
@ -21,7 +18,8 @@ let
|
||||||
sites =
|
sites =
|
||||||
host.config.custom.meta.sites
|
host.config.custom.meta.sites
|
||||||
|> lib.attrValues
|
|> 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 != [ ])
|
|> lib.filter ({ sites, ... }: sites != [ ])
|
||||||
|> (widgets: {
|
|> (widgets: {
|
||||||
|
|
@ -30,6 +28,9 @@ let
|
||||||
inherit widgets;
|
inherit widgets;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
perHostDomains =
|
||||||
|
perHostSitesWidget.widgets |> lib.concatMap (widget: widget.sites) |> lib.map (site: site.domain);
|
||||||
|
|
||||||
applicationSitesWidget =
|
applicationSitesWidget =
|
||||||
allHosts
|
allHosts
|
||||||
|> lib.attrValues
|
|> lib.attrValues
|
||||||
|
|
@ -44,7 +45,7 @@ let
|
||||||
type = "monitor";
|
type = "monitor";
|
||||||
cache = "1m";
|
cache = "1m";
|
||||||
title = "${name} Services";
|
title = "${name} Services";
|
||||||
sites = value;
|
sites = value |> lib.map (site: site // { timeout = "5s"; });
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|> (widgets: {
|
|> (widgets: {
|
||||||
|
|
@ -91,17 +92,6 @@ let
|
||||||
</div>
|
</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
|
in
|
||||||
{
|
{
|
||||||
options.custom.web-services.glance = {
|
options.custom.web-services.glance = {
|
||||||
|
|
@ -134,7 +124,7 @@ in
|
||||||
{
|
{
|
||||||
type = "search";
|
type = "search";
|
||||||
search-engine = "https://search.splitleaf.de/search?q={QUERY}";
|
search-engine = "https://search.splitleaf.de/search?q={QUERY}";
|
||||||
autofocus = true;
|
autofocus = false;
|
||||||
}
|
}
|
||||||
applicationSitesWidget
|
applicationSitesWidget
|
||||||
perHostSitesWidget
|
perHostSitesWidget
|
||||||
|
|
@ -142,7 +132,7 @@ in
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
size = "small";
|
size = "small";
|
||||||
widgets = [ githubBadgeWidget ] ++ dnsWidgets;
|
widgets = [ githubBadgeWidget ];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue