mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 22:29:06 +01:00
Compare commits
5 commits
f38cb764e0
...
993b931b00
| Author | SHA1 | Date | |
|---|---|---|---|
| 993b931b00 | |||
| 1ad5ce0ca0 | |||
| 7fb596cdeb | |||
| fe5113d476 | |||
| b26751a5fb |
24 changed files with 53 additions and 67 deletions
|
|
@ -67,12 +67,6 @@
|
|||
domain = "grafana.${config.custom.networking.overlay.domain}";
|
||||
};
|
||||
|
||||
gatus = {
|
||||
enable = true;
|
||||
domain = "status.${config.custom.networking.overlay.domain}";
|
||||
generateDefaultEndpoints = true;
|
||||
};
|
||||
|
||||
glance = {
|
||||
enable = true;
|
||||
domain = "home.${config.custom.networking.overlay.domain}";
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
{ name, ... }:
|
||||
{
|
||||
options = {
|
||||
name = lib.mkOption {
|
||||
title = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
default = name;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Alertmanager";
|
||||
title = "Alertmanager";
|
||||
icon = "sh:prometheus";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -132,8 +132,8 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.port = lib.mkIf (cfg.domain != null) cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = lib.mkIf (cfg.domain != null) {
|
||||
name = "Alloy";
|
||||
icon = "sh:alloy";
|
||||
title = "Alloy";
|
||||
icon = "sh:grafana-alloy";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ in
|
|||
persistence.directories = [ "/var/lib/${config.services.prometheus.stateDir}" ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Prometheus";
|
||||
title = "Prometheus";
|
||||
icon = "sh:prometheus";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ in
|
|||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.gui.domain} = lib.mkIf (cfg.gui.domain != null) {
|
||||
name = "Syncthing";
|
||||
title = "Syncthing";
|
||||
icon = "sh:syncthing";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ in
|
|||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Actual Budget";
|
||||
title = "Actual Budget";
|
||||
icon = "sh:actual-budget";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ in
|
|||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Atuin";
|
||||
title = "Atuin";
|
||||
icon = "sh:atuin";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ in
|
|||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "File Browser";
|
||||
title = "File Browser";
|
||||
icon = "sh:file-browser";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ in
|
|||
persistence.directories = [ config.services.forgejo.stateDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Forgejo";
|
||||
title = "Forgejo";
|
||||
icon = "sh:forgejo";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ in
|
|||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "FreshRSS";
|
||||
title = "FreshRSS";
|
||||
icon = "sh:freshrss";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ in
|
|||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Gatus";
|
||||
title = "Gatus";
|
||||
icon = "sh:gatus";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,6 +6,24 @@
|
|||
}:
|
||||
let
|
||||
cfg = config.custom.web-services.glance;
|
||||
|
||||
servicesWidgets =
|
||||
allHosts
|
||||
|> lib.attrValues
|
||||
|> lib.map (host: {
|
||||
hostName = host.config.networking.hostName;
|
||||
services = host.config.custom.meta.services |> lib.attrValues;
|
||||
})
|
||||
|> lib.filter ({ services, ... }: services != [ ])
|
||||
|> lib.map (
|
||||
{ hostName, services }:
|
||||
{
|
||||
type = "monitor";
|
||||
cache = "1m";
|
||||
title = "Services - ${hostName}";
|
||||
sites = services;
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
options.custom.web-services.glance = {
|
||||
|
|
@ -23,54 +41,28 @@ in
|
|||
config = lib.mkIf cfg.enable {
|
||||
services.glance = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
server.port = cfg.port;
|
||||
|
||||
pages = lib.singleton {
|
||||
name = "Services";
|
||||
name = "Home";
|
||||
center-vertically = true;
|
||||
|
||||
columns = lib.singleton {
|
||||
size = "full";
|
||||
widgets =
|
||||
allHosts
|
||||
|> lib.attrValues
|
||||
|> lib.map (host: {
|
||||
hostName = host.config.networking.hostName;
|
||||
services = host.config.custom.meta.services |> lib.attrValues;
|
||||
})
|
||||
|> lib.filter ({ services, ... }: services != [ ])
|
||||
|> lib.map (
|
||||
{ hostName, services }:
|
||||
{
|
||||
type = "monitor";
|
||||
cache = "1m";
|
||||
title = "Services - ${hostName}";
|
||||
sites =
|
||||
services
|
||||
|> lib.map (
|
||||
{
|
||||
name,
|
||||
url,
|
||||
icon,
|
||||
}:
|
||||
{
|
||||
title = name;
|
||||
inherit url icon;
|
||||
}
|
||||
);
|
||||
}
|
||||
);
|
||||
lib.singleton {
|
||||
type = "search";
|
||||
search-engine = "google";
|
||||
autofocus = true;
|
||||
}
|
||||
++ servicesWidgets;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Glance";
|
||||
icon = "sh:glance";
|
||||
};
|
||||
};
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Grafana";
|
||||
title = "Grafana";
|
||||
icon = "sh:grafana";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.files = "${pkgs.it-tools}/lib";
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "IT-Tools";
|
||||
title = "IT-Tools";
|
||||
icon = "sh:it-tools";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ in
|
|||
];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Karakeep";
|
||||
title = "Karakeep";
|
||||
icon = "sh:karakeep";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Networking Toolbox";
|
||||
title = "Networking Toolbox";
|
||||
icon = "sh:networking-toolbox";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "ntfy";
|
||||
title = "ntfy";
|
||||
icon = "sh:ntfy";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ in
|
|||
];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Outline";
|
||||
title = "Outline";
|
||||
icon = "sh:outline";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.files = dataDir;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Blog";
|
||||
icon = "sh:zola";
|
||||
title = "Blog";
|
||||
icon = "sh:hugo";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "PrivateBin";
|
||||
title = "PrivateBin";
|
||||
icon = "sh:privatebin";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ in
|
|||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Radicale";
|
||||
title = "Radicale";
|
||||
icon = "sh:radicale";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Screego";
|
||||
title = "Screego";
|
||||
icon = "mdi:projector-screen-outline";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Stirling PDF";
|
||||
title = "Stirling PDF";
|
||||
icon = "sh:stirling-pdf";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue