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