diff --git a/hosts/nixedo/services/homepage/default.nix b/hosts/nixedo/services/homepage/default.nix index 59e45c96..691b9021 100644 --- a/hosts/nixedo/services/homepage/default.nix +++ b/hosts/nixedo/services/homepage/default.nix @@ -1,20 +1,25 @@ +{ config, ... }: + { - services = { - homepage-dashboard = { - enable = true; - listenPort = 8097; - openFirewall = true; + services = + let + cfg = config.services.homepage-dashboard; + in + { + homepage-dashboard = { + enable = true; + listenPort = 8097; + openFirewall = true; - services = import ./services.nix; - widgets = import ./widgets.nix; + services = (import ./services.nix { inherit config; }); + widgets = import ./widgets.nix; + }; + + nginx.virtualHosts."nixedo.oliverdavies.uk" = { + forceSSL = true; + useACMEHost = "oliverdavies.uk"; + + locations."/".proxyPass = "http://localhost:${toString cfg.listenPort}"; + }; }; - - nginx.virtualHosts."nixedo.oliverdavies.uk" = { - forceSSL = true; - useACMEHost = "oliverdavies.uk"; - - locations."/".proxyPass = - "http://localhost:${toString config.services.homepage-dashboard.listenPort}"; - }; - }; } diff --git a/hosts/nixedo/services/homepage/services.nix b/hosts/nixedo/services/homepage/services.nix index 0f883ad6..94d416ed 100644 --- a/hosts/nixedo/services/homepage/services.nix +++ b/hosts/nixedo/services/homepage/services.nix @@ -1,10 +1,14 @@ +{ config }: + [ { "Media" = [ { "Jellyfin" = { - description = "Jellyfin"; href = "https://jellyfin.oliverdavies.uk"; + icon = "jellyfin"; + description = "The Free Software Media System"; + siteMonitor = "http://localhost:8096"; }; } ]; @@ -13,11 +17,16 @@ { "Services" = [ { - "Paperless-ngx" = { - description = "Document management system"; - href = services.paperless.settings.PAPERLESS_URL; - icon = "paperless"; - }; + "Paperless-ngx" = + let + cfg = config.services.paperless; + in + { + description = "Document management system"; + href = cfg.settings.PAPERLESS_URL; + icon = "paperless"; + siteMonitor = "http://localhost:${toString cfg.port}"; + }; } ]; }