From 374ab0a01e397851da57620bd3bc80d2bbca7f73 Mon Sep 17 00:00:00 2001 From: Sumner Evans Date: Wed, 23 Oct 2024 13:02:59 -0600 Subject: [PATCH] glance: init Signed-off-by: Sumner Evans --- host-configurations/morak.nix | 1 + modules/services/default.nix | 1 + modules/services/glance.nix | 28 ++++++++++++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 modules/services/glance.nix diff --git a/host-configurations/morak.nix b/host-configurations/morak.nix index 5240137..c8b2481 100644 --- a/host-configurations/morak.nix +++ b/host-configurations/morak.nix @@ -65,6 +65,7 @@ in { # Services # ############ services.airsonic.enable = true; + services.glance.enable = true; services.grafana.enable = true; services.isso.enable = true; services.logrotate.enable = true; diff --git a/modules/services/default.nix b/modules/services/default.nix index 6c80a21..f8b7dee 100644 --- a/modules/services/default.nix +++ b/modules/services/default.nix @@ -6,6 +6,7 @@ ./airsonic.nix ./bitwarden.nix ./docker.nix + ./glance.nix ./gonic.nix ./grafana.nix ./healthcheck.nix diff --git a/modules/services/glance.nix b/modules/services/glance.nix new file mode 100644 index 0000000..d504cd2 --- /dev/null +++ b/modules/services/glance.nix @@ -0,0 +1,28 @@ +{ config, lib, ... }: +with lib; +let cfg = config.services.glance; +in mkIf cfg.enable { + services.glance = { + settings = { + server.port = 5678; + pages = [{ + columns = [{ + size = "full"; + widgets = [{ type = "calendar"; }]; + }]; + name = "Home"; + }]; + }; + }; + + services.nginx = { + enable = true; + recommendedProxySettings = true; + virtualHosts."glance.sumnerevans.com" = { + locations."/".proxyPass = let + host = cfg.settings.server.host; + port = toString cfg.settings.server.port; + in "http://${host}:${port}"; + }; + }; +}