Compare commits

..

No commits in common. "993b931b00d8c48f5d9aae387528997da428cdaa" and "fd5acfbcf65d1237af500f52e8e73446b1b647cb" have entirely different histories.

24 changed files with 13 additions and 232 deletions

View file

@ -67,9 +67,10 @@
domain = "grafana.${config.custom.networking.overlay.domain}";
};
glance = {
gatus = {
enable = true;
domain = "home.${config.custom.networking.overlay.domain}";
domain = "status.${config.custom.networking.overlay.domain}";
generateDefaultEndpoints = true;
};
};
};

View file

@ -1,27 +0,0 @@
{ lib, ... }:
{
options.custom.meta.services = lib.mkOption {
type = lib.types.attrsOf (
lib.types.submodule (
{ name, ... }:
{
options = {
title = lib.mkOption {
type = lib.types.nonEmptyStr;
default = name;
};
url = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "https://${name}";
};
icon = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "";
};
};
}
)
);
default = { };
};
}

View file

@ -98,13 +98,6 @@ in
};
};
custom = {
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
meta.services.${cfg.domain} = {
title = "Alertmanager";
icon = "sh:prometheus";
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
};
}

View file

@ -128,13 +128,6 @@ in
};
};
custom = {
services.caddy.virtualHosts.${cfg.domain}.port = lib.mkIf (cfg.domain != null) cfg.port;
meta.services.${cfg.domain} = lib.mkIf (cfg.domain != null) {
title = "Alloy";
icon = "sh:grafana-alloy";
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = lib.mkIf (cfg.domain != null) cfg.port;
};
}

View file

@ -125,11 +125,6 @@ in
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
persistence.directories = [ "/var/lib/${config.services.prometheus.stateDir}" ];
meta.services.${cfg.domain} = {
title = "Prometheus";
icon = "sh:prometheus";
};
};
};
}

View file

@ -170,11 +170,6 @@ in
};
persistence.directories = [ dataDir ];
meta.services.${cfg.gui.domain} = lib.mkIf (cfg.gui.domain != null) {
title = "Syncthing";
icon = "sh:syncthing";
};
};
};
}

View file

@ -52,11 +52,6 @@ in
};
persistence.directories = [ dataDir ];
meta.services.${cfg.domain} = {
title = "Actual Budget";
icon = "sh:actual-budget";
};
};
};
}

View file

@ -47,11 +47,6 @@ in
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
persistence.directories = [ dataDir ];
meta.services.${cfg.domain} = {
title = "Atuin";
icon = "sh:atuin";
};
};
};
}

View file

@ -48,11 +48,6 @@ in
};
persistence.directories = [ dataDir ];
meta.services.${cfg.domain} = {
title = "File Browser";
icon = "sh:file-browser";
};
};
};
}

View file

@ -83,11 +83,6 @@ in
};
persistence.directories = [ config.services.forgejo.stateDir ];
meta.services.${cfg.domain} = {
title = "Forgejo";
icon = "sh:forgejo";
};
};
};
}

View file

@ -49,11 +49,6 @@ in
};
persistence.directories = [ dataDir ];
meta.services.${cfg.domain} = {
title = "FreshRSS";
icon = "sh:freshrss";
};
};
};
}

View file

@ -210,11 +210,6 @@ in
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
persistence.directories = [ dataDir ];
meta.services.${cfg.domain} = {
title = "Gatus";
icon = "sh:gatus";
};
};
};
}

View file

@ -1,68 +0,0 @@
{
config,
lib,
allHosts,
...
}:
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 = {
enable = lib.mkEnableOption "";
domain = lib.mkOption {
type = lib.types.nonEmptyStr;
default = "";
};
port = lib.mkOption {
type = lib.types.port;
default = 63958;
};
};
config = lib.mkIf cfg.enable {
services.glance = {
enable = true;
settings = {
server.port = cfg.port;
pages = lib.singleton {
name = "Home";
center-vertically = true;
columns = lib.singleton {
size = "full";
widgets =
lib.singleton {
type = "search";
search-engine = "google";
autofocus = true;
}
++ servicesWidgets;
};
};
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
};
}

View file

@ -85,13 +85,6 @@ in
};
};
custom = {
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
meta.services.${cfg.domain} = {
title = "Grafana";
icon = "sh:grafana";
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
};
}

View file

@ -17,13 +17,6 @@ in
};
config = lib.mkIf cfg.enable {
custom = {
services.caddy.virtualHosts.${cfg.domain}.files = "${pkgs.it-tools}/lib";
meta.services.${cfg.domain} = {
title = "IT-Tools";
icon = "sh:it-tools";
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.files = "${pkgs.it-tools}/lib";
};
}

View file

@ -57,11 +57,6 @@ in
"/var/lib/karakeep"
"/var/lib/meilisearch"
];
meta.services.${cfg.domain} = {
title = "Karakeep";
icon = "sh:karakeep";
};
};
};
}

View file

@ -22,13 +22,6 @@ in
pull = "newer";
};
custom = {
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
meta.services.${cfg.domain} = {
title = "Networking Toolbox";
icon = "sh:networking-toolbox";
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
};
}

View file

@ -26,13 +26,6 @@ in
};
};
custom = {
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
meta.services.${cfg.domain} = {
title = "ntfy";
icon = "sh:ntfy";
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
};
}

View file

@ -85,11 +85,6 @@ in
dataDir
config.services.postgresql.dataDir
];
meta.services.${cfg.domain} = {
title = "Outline";
icon = "sh:outline";
};
};
};
}

View file

@ -27,13 +27,6 @@ in
script = "nix build github:SebastianStork/blog --out-link ${dataDir} --refresh";
};
custom = {
services.caddy.virtualHosts.${cfg.domain}.files = dataDir;
meta.services.${cfg.domain} = {
title = "Blog";
icon = "sh:hugo";
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.files = dataDir;
};
}

View file

@ -37,13 +37,6 @@ in
};
};
custom = {
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
meta.services.${cfg.domain} = {
title = "PrivateBin";
icon = "sh:privatebin";
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
};
}

View file

@ -109,11 +109,6 @@ in
};
persistence.directories = [ dataDir ];
meta.services.${cfg.domain} = {
title = "Radicale";
icon = "sh:radicale";
};
};
};
}

View file

@ -26,13 +26,6 @@ in
};
};
custom = {
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
meta.services.${cfg.domain} = {
title = "Screego";
icon = "mdi:projector-screen-outline";
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
};
}

View file

@ -40,13 +40,6 @@ in
};
};
custom = {
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
meta.services.${cfg.domain} = {
title = "Stirling PDF";
icon = "sh:stirling-pdf";
};
};
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
};
}