mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-23 13:28:27 +01:00
Compare commits
No commits in common. "f38cb764e0cf851f551a8a563ecdc022f1abd465" and "2d9a779fb19b2b076a5c54024bf77ebce470d31c" have entirely different histories.
f38cb764e0
...
2d9a779fb1
23 changed files with 29 additions and 196 deletions
|
|
@ -1,27 +0,0 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
options.custom.meta.services = lib.mkOption {
|
||||
type = lib.types.attrsOf (
|
||||
lib.types.submodule (
|
||||
{ name, ... }:
|
||||
{
|
||||
options = {
|
||||
name = 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 = { };
|
||||
};
|
||||
}
|
||||
|
|
@ -98,13 +98,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Alertmanager";
|
||||
icon = "sh:prometheus";
|
||||
};
|
||||
};
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
name = "Alloy";
|
||||
icon = "sh:alloy";
|
||||
};
|
||||
};
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.port = lib.mkIf (cfg.domain != null) cfg.port;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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} = {
|
||||
name = "Prometheus";
|
||||
icon = "sh:prometheus";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,11 +170,6 @@ in
|
|||
};
|
||||
|
||||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.gui.domain} = lib.mkIf (cfg.gui.domain != null) {
|
||||
name = "Syncthing";
|
||||
icon = "sh:syncthing";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,11 +52,6 @@ in
|
|||
};
|
||||
|
||||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Actual Budget";
|
||||
icon = "sh:actual-budget";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,11 +47,6 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Atuin";
|
||||
icon = "sh:atuin";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,11 +48,6 @@ in
|
|||
};
|
||||
|
||||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "File Browser";
|
||||
icon = "sh:file-browser";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,11 +83,6 @@ in
|
|||
};
|
||||
|
||||
persistence.directories = [ config.services.forgejo.stateDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Forgejo";
|
||||
icon = "sh:forgejo";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,11 +49,6 @@ in
|
|||
};
|
||||
|
||||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "FreshRSS";
|
||||
icon = "sh:freshrss";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -210,11 +210,6 @@ in
|
|||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Gatus";
|
||||
icon = "sh:gatus";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,49 +28,34 @@ in
|
|||
|
||||
pages = lib.singleton {
|
||||
name = "Services";
|
||||
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 }:
|
||||
columns = [
|
||||
{
|
||||
size = "full";
|
||||
widgets = [
|
||||
{
|
||||
type = "monitor";
|
||||
cache = "1m";
|
||||
title = "Services - ${hostName}";
|
||||
title = "Services";
|
||||
sites =
|
||||
services
|
||||
allHosts
|
||||
|> lib.attrValues
|
||||
|> lib.map (
|
||||
{
|
||||
name,
|
||||
url,
|
||||
icon,
|
||||
}:
|
||||
{
|
||||
title = name;
|
||||
inherit url icon;
|
||||
}
|
||||
);
|
||||
host:
|
||||
host.config.custom.services.caddy.virtualHosts |> lib.attrValues |> lib.map (vHost: vHost.domain)
|
||||
)
|
||||
|> lib.concatLists
|
||||
|> lib.map (domain: {
|
||||
title = domain;
|
||||
url = "https://${domain}";
|
||||
});
|
||||
}
|
||||
);
|
||||
};
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,13 +85,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Grafana";
|
||||
icon = "sh:grafana";
|
||||
};
|
||||
};
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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} = {
|
||||
name = "IT-Tools";
|
||||
icon = "sh:it-tools";
|
||||
};
|
||||
};
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.files = "${pkgs.it-tools}/lib";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,11 +57,6 @@ in
|
|||
"/var/lib/karakeep"
|
||||
"/var/lib/meilisearch"
|
||||
];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Karakeep";
|
||||
icon = "sh:karakeep";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,13 +22,6 @@ in
|
|||
pull = "newer";
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Networking Toolbox";
|
||||
icon = "sh:networking-toolbox";
|
||||
};
|
||||
};
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "ntfy";
|
||||
icon = "sh:ntfy";
|
||||
};
|
||||
};
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,11 +85,6 @@ in
|
|||
dataDir
|
||||
config.services.postgresql.dataDir
|
||||
];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Outline";
|
||||
icon = "sh:outline";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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} = {
|
||||
name = "Blog";
|
||||
icon = "sh:zola";
|
||||
};
|
||||
};
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.files = dataDir;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,13 +37,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "PrivateBin";
|
||||
icon = "sh:privatebin";
|
||||
};
|
||||
};
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -109,11 +109,6 @@ in
|
|||
};
|
||||
|
||||
persistence.directories = [ dataDir ];
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Radicale";
|
||||
icon = "sh:radicale";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,13 +26,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Screego";
|
||||
icon = "mdi:projector-screen-outline";
|
||||
};
|
||||
};
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,13 +40,6 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
custom = {
|
||||
services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
|
||||
meta.services.${cfg.domain} = {
|
||||
name = "Stirling PDF";
|
||||
icon = "sh:stirling-pdf";
|
||||
};
|
||||
};
|
||||
custom.services.caddy.virtualHosts.${cfg.domain}.port = cfg.port;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue