feat: switch homer to glance
This commit is contained in:
parent
28c9d0136b
commit
894774be4f
3 changed files with 184 additions and 162 deletions
183
modules/nixos/services/media/glance/default.nix
Normal file
183
modules/nixos/services/media/glance/default.nix
Normal file
|
|
@ -0,0 +1,183 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
namespace,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf mkEnableOption;
|
||||||
|
|
||||||
|
cfg = config.${namespace}.services.media.glance;
|
||||||
|
in {
|
||||||
|
options.${namespace}.services.media.glance = {
|
||||||
|
enable = mkEnableOption "Enable Glance";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.glance = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
|
||||||
|
environmentFile = config.sops.templates."glance/secrets.env".path;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
host = "0.0.0.0";
|
||||||
|
port = 2000;
|
||||||
|
};
|
||||||
|
|
||||||
|
theme = {
|
||||||
|
# Teal city predefined theme (https://github.com/glanceapp/glance/blob/main/docs/themes.md#teal-city)
|
||||||
|
background-color = "225 14 15";
|
||||||
|
primary-color = "157 47 65";
|
||||||
|
contrast-multiplier = 1.1;
|
||||||
|
};
|
||||||
|
|
||||||
|
pages = [
|
||||||
|
{
|
||||||
|
name = "Home";
|
||||||
|
columns = [
|
||||||
|
{
|
||||||
|
size = "small";
|
||||||
|
widgets = [
|
||||||
|
{
|
||||||
|
type = "calendar";
|
||||||
|
first-day-of-the-week = "monday";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
size = "full";
|
||||||
|
widgets = [
|
||||||
|
{
|
||||||
|
type = "monitor";
|
||||||
|
cache = "1m";
|
||||||
|
title = "Services";
|
||||||
|
sites = [
|
||||||
|
{
|
||||||
|
title = "Zitadel";
|
||||||
|
url = "https://auth.kruining.eu";
|
||||||
|
icon = "sh:zitadel";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Forgejo";
|
||||||
|
url = "https://git.amarth.cloud/chris";
|
||||||
|
icon = "sh:forgejo";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Vaultwarden";
|
||||||
|
url = "https://vault.kruining.eu";
|
||||||
|
icon = "sh:vaultwarden";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "monitor";
|
||||||
|
cache = "1m";
|
||||||
|
title = "Observability";
|
||||||
|
sites = [
|
||||||
|
{
|
||||||
|
title = "Grafana";
|
||||||
|
url = "http://${config.networking.hostName}:${builtins.toString config.services.grafana.settings.server.http_port}";
|
||||||
|
icon = "sh:grafana";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Prometheus";
|
||||||
|
url = "http://${config.networking.hostName}:${builtins.toString config.services.prometheus.port}";
|
||||||
|
icon = "sh:prometheus";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "monitor";
|
||||||
|
cache = "1m";
|
||||||
|
title = "Media";
|
||||||
|
sites = [
|
||||||
|
{
|
||||||
|
title = "Jellyfin";
|
||||||
|
url = "http://${config.networking.hostName}:8096";
|
||||||
|
icon = "sh:jellyfin";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Radarr";
|
||||||
|
url = "http://${config.networking.hostName}:2001";
|
||||||
|
icon = "sh:radarr";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Sonarr";
|
||||||
|
url = "http://${config.networking.hostName}:2002";
|
||||||
|
icon = "sh:sonarr";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Lidarr";
|
||||||
|
url = "http://${config.networking.hostName}:2003";
|
||||||
|
icon = "sh:lidarr";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Prowlarr";
|
||||||
|
url = "http://${config.networking.hostName}:2004";
|
||||||
|
icon = "sh:prowlarr";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "qBittorrent";
|
||||||
|
url = "http://${config.networking.hostName}:${builtins.toString config.services.qbittorrent.webuiPort}";
|
||||||
|
icon = "sh:qbittorrent";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "SABnzbd";
|
||||||
|
url = "http://${config.networking.hostName}:8080";
|
||||||
|
icon = "sh:sabnzbd";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "videos";
|
||||||
|
channels = [
|
||||||
|
"UCXuqSBlHAE6Xw-yeJA0Tunw" # Linus Tech Tips
|
||||||
|
"UCR-DXc1voovS8nhAvccRZhg" # Jeff Geerling
|
||||||
|
"UCsBjURrPoezykLs9EqgamOA" # Fireship
|
||||||
|
"UCBJycsmduvYEL83R_U4JriQ" # Marques Brownlee
|
||||||
|
"UCHnyfMqiRRG1u-2MsSQLbXA" # Veritasium
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
size = "small";
|
||||||
|
widgets = [
|
||||||
|
{
|
||||||
|
type = "weather";
|
||||||
|
location = "Amsterdam, The Netherlands";
|
||||||
|
units = "metric";
|
||||||
|
hour-format = "24h";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
type = "server-stats";
|
||||||
|
servers = [
|
||||||
|
{
|
||||||
|
type = "local";
|
||||||
|
name = "Ulmo";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sops.templates."glance/secrets.env" = {
|
||||||
|
# owner = config.services.glance.user;
|
||||||
|
# group = config.services.glance.group;
|
||||||
|
content = ''
|
||||||
|
RADARR_KEY="${config.sops.placeholder."radarr/apikey"}"
|
||||||
|
SONARR_KEY="${config.sops.placeholder."sonarr/apikey"}"
|
||||||
|
LIDARR_KEY="${config.sops.placeholder."lidarr/apikey"}"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,161 +0,0 @@
|
||||||
{ config, lib, namespace, ... }:
|
|
||||||
let
|
|
||||||
inherit (lib) mkIf mkEnableOption;
|
|
||||||
|
|
||||||
cfg = config.${namespace}.services.media.homer;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.${namespace}.services.media.homer = {
|
|
||||||
enable = mkEnableOption "Enable homer";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
networking.firewall.allowedTCPPorts = [ 2000 ];
|
|
||||||
|
|
||||||
services = {
|
|
||||||
homer = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
virtualHost = {
|
|
||||||
caddy.enable = true;
|
|
||||||
domain = "http://:2000";
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
title = "Ulmo dashboard";
|
|
||||||
|
|
||||||
columns = 4;
|
|
||||||
connectivityCheck = true;
|
|
||||||
|
|
||||||
links = [];
|
|
||||||
|
|
||||||
services = [
|
|
||||||
{
|
|
||||||
name = "Services";
|
|
||||||
items = [
|
|
||||||
{
|
|
||||||
name = "Zitadel";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/zitadel.svg";
|
|
||||||
tag = "app";
|
|
||||||
url = "https://auth.kruining.eu";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "Forgejo";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/forgejo.svg";
|
|
||||||
tag = "app";
|
|
||||||
type = "Gitea";
|
|
||||||
url = "https://git.amarth.cloud";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "Vaultwarden";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/vaultwarden.svg";
|
|
||||||
type = "Vaultwarden";
|
|
||||||
tag = "app";
|
|
||||||
url = "https://vault.kruining.eu";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "Observability";
|
|
||||||
items = [
|
|
||||||
{
|
|
||||||
name = "Grafana";
|
|
||||||
type = "Grafana";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/grafana.svg";
|
|
||||||
tag = "app";
|
|
||||||
url = "http://${config.networking.hostName}:${builtins.toString config.services.grafana.settings.server.http_port}";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "Prometheus";
|
|
||||||
type = "Prometheus";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/prometheus.svg";
|
|
||||||
tag = "app";
|
|
||||||
url = "http://${config.networking.hostName}:${builtins.toString config.services.prometheus.port}";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "Media";
|
|
||||||
items = [
|
|
||||||
{
|
|
||||||
name = "Jellyfin (Movies)";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/jellyfin.svg";
|
|
||||||
tag = "app";
|
|
||||||
type = "Emby";
|
|
||||||
url = "http://${config.networking.hostName}:8096";
|
|
||||||
apikey = "e3ceed943eeb409ba8342738db7cc1f5";
|
|
||||||
libraryType = "movies";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "Radarr";
|
|
||||||
type = "Radarr";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/radarr.svg";
|
|
||||||
tag = "app";
|
|
||||||
url = "http://${config.networking.hostName}:2001";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "Sonarr";
|
|
||||||
type = "Sonarr";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/sonarr.svg";
|
|
||||||
tag = "app";
|
|
||||||
url = "http://${config.networking.hostName}:2002";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "Lidarr";
|
|
||||||
type = "Lidarr";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/lidarr.svg";
|
|
||||||
tag = "app";
|
|
||||||
url = "http://${config.networking.hostName}:2003";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "Prowlarr";
|
|
||||||
type = "Prowlarr";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/prowlarr.svg";
|
|
||||||
tag = "app";
|
|
||||||
url = "http://${config.networking.hostName}:2004";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "qBittorrent";
|
|
||||||
type = "qBittorrent";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/qbittorrent.svg";
|
|
||||||
tag = "app";
|
|
||||||
url = "http://${config.networking.hostName}:${builtins.toString config.services.qbittorrent.webuiPort}";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
name = "SABnzbd";
|
|
||||||
type = "SABnzbd";
|
|
||||||
logo = "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/sabnzdb-light.svg";
|
|
||||||
tag = "app";
|
|
||||||
url = "http://${config.networking.hostName}:8080";
|
|
||||||
target = "_blank";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -161,7 +161,7 @@
|
||||||
networking.ssh.enable = true;
|
networking.ssh.enable = true;
|
||||||
|
|
||||||
media.enable = true;
|
media.enable = true;
|
||||||
media.homer.enable = true;
|
media.glance.enable = true;
|
||||||
media.mydia.enable = true;
|
media.mydia.enable = true;
|
||||||
media.nfs.enable = true;
|
media.nfs.enable = true;
|
||||||
media.servarr = {
|
media.servarr = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue