{ self, config, lib, pkgs, ... }: with self.lib.nginx; { services.homepage-dashboard = { enable = true; allowedHosts = "vapor.systems"; environmentFile = config.secrets.homepage.dest; settings = { hideVersion = true; headerStyle = "clean"; statusStyle = "dot"; theme = "dark"; background = "/images/backgrounds/wallhaven-39gogv.jpg"; cardBlur = "xl"; useEqualHeights = true; layout = [ { "Media" = { style = "row"; columns = 5; }; } { "Games" = { style = "row"; columns = 4; }; } { "Hosting" = { style = "row"; columns = 2; header = false; "Monitoring" = { style = "row"; columns = 1; }; "Development" = { style = "row"; columns = 2; }; }; } ]; }; services = [ { "Media" = [ { "Jellyfin" = { icon = "sh-jellyfin"; description = "Media Server"; href = "https://media.cocaine.farm"; siteMonitor = "https://media.cocaine.farm"; widget = { type = "jellyfin"; url = "https://media.cocaine.farm"; key = "{{HOMEPAGE_VAR_JELLYFIN_KEY}}"; enableBlocks = true; enableNowPlaying = false; enableUser = true; enableMediaControl = false; showEpisodeNumber = false; expandOneStreamToTwoRows = false; }; }; } { "Radarr" = { icon = "sh-radarr"; description = "Movie Management"; href = "https://radarr.media.cocaine.farm"; siteMonitor = "https://radarr.media.cocaine.farm"; widget = { type = "radarr"; url = "http://phaenn:7878"; key = "{{HOMEPAGE_VAR_RADARR_KEY}}"; enableQueue = false; }; }; } { "Sonarr" = { icon = "sh-sonarr"; description = "Series Management"; href = "https://sonarr.media.cocaine.farm"; siteMonitor = "https://sonarr.media.cocaine.farm"; widget = { type = "sonarr"; url = "http://phaenn:8989"; key = "{{HOMEPAGE_VAR_SONARR_KEY}}"; enableQueue = false; }; }; } { "Prowlarr" = { icon = "sh-prowlarr"; description = "Tracker Management"; href = "https://prowlarr.media.cocaine.farm"; siteMonitor = "https://prowlarr.media.cocaine.farm"; widget = { type = "prowlarr"; url = "http://phaenn:9696"; key = "{{HOMEPAGE_VAR_PROWLARR_KEY}}"; }; }; } { "ruTorrent" = { icon = "/images/icons/rutorrent.png"; description = "Torrent Client"; href = "https://torrent.media.cocaine.farm"; siteMonitor = "https://torrent.media.cocaine.farm"; widget = { type = "rutorrent"; url = "http://10.10.0.2"; }; }; } ]; } { "Games" = [ { "Minecraft - Dungeons & Taverns" = { icon = "sh-minecraft"; description = "c0re.space:25566"; widgets = [ { type = "prometheusmetric"; url = "http://ettves:9090"; refreshInterval = 10000; metrics = [ { label = "Players"; query = ''sum(minecraft_players_online)''; } { label = "TPS"; query = ''round(minecraft_tps)''; } ]; } ]; }; } { "Minecraft - Vanilla" = { icon = "sh-minecraft"; description = "c0re.space:25565"; widgets = [ { type = "prometheusmetric"; url = "http://ettves:9090"; refreshInterval = 10000; metrics = [ { label = "Players"; query = ''sum(mc_players_online_total)''; } { label = "TPS"; query = ''round(mc_tps)''; } ]; } ]; }; } { "Factorio - Space Age" = { icon = "/images/icons/factorio.png"; description = "cocaine.farm"; }; } { "Assetto Corsa Competizione" = { icon = "/images/icons/ac-logo-white.svg"; description = "cocaine.farm:9231"; }; } ]; } { "Hosting" = [ { "Monitoring" = [ { "Prometheus" = { icon = "sh-prometheus"; description = "Monitoring & Metrics Database"; href = "https://prometheus.vapor.systems"; siteMonitor = "https://prometheus.vapor.systems"; }; } ]; } { "Development" = [ { "Gitea" = { icon = "sh-gitea"; description = "Git Repository Host"; href = "https://git.vapor.systems"; siteMonitor = "https://git.vapor.systems"; }; } { "Hydra" = { icon = "sh-nixos"; description = "Nix Build System"; href = "https://hydra.vapor.systems"; siteMonitor = "https://hydra.vapor.systems"; }; } ]; } ]; } ]; }; secrets = { homepage = { source = ../../secrets/homepage.env; dest = "/etc/secrets/homepage.env"; }; }; services.nginx = { enable = true; virtualHosts = { "vapor.systems" = lib.mkMerge [ (proxyDomain "vapor.systems" "http://localhost:8082/") { locations."/images" = { root = "/var/www/vapor.systems"; }; } ]; }; }; }