From bd7b0192962c194dfdbca5174f449aedd31527e1 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 | 78 +++++++++++++++++++++++++++++++++++ 3 files changed, 80 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..3bdec4f --- /dev/null +++ b/modules/services/glance.nix @@ -0,0 +1,78 @@ +{ config, lib, ... }: +with lib; +let cfg = config.services.glance; +in mkIf cfg.enable { + services.glance = { + settings = { + server.port = 5678; + pages = [{ + columns = [ + { + size = "small"; + widgets = [ + { type = "calendar"; } + { + type = "weather"; + units = "imperial"; + hour-format = "24h"; + location = "Denver, Colorado, United States"; + } + ]; + } + { + size = "full"; + widgets = [{ + type = "rss"; + title = "Following"; + style = "detailed-list"; + feeds = [ + { url = "https://b-sharman.dev/blog.xml"; } + { url = "https://blog.babel.sh/rss"; } + { url = "https://blog.beeper.com/feed"; } + { url = "https://blog.danslimmon.com/feed"; } + { url = "https://chrpaul.de/feed.xml"; } + { url = "https://dominickm.com/feed"; } + { url = "https://elijahpotter.dev/rss.xml"; } + { url = "https://ezrichards.github.io/index.xml"; } + { url = "https://go.dev/blog/feed.atom"; } + { url = "https://intuitiveexplanations.com/feed.xml"; } + { url = "https://jjtech.dev/feed.xml"; } + { url = "https://jsomers.net/blog/feed"; } + { url = "https://jvns.ca/atom.xml"; } + { url = "https://keenanschott.com/index.xml"; } + { url = "https://ludic.mataroa.blog/rss/"; } + { url = "https://lukaswerner.com/feed.xml"; } + { url = "https://lukeplant.me.uk/blog/atom/index.xml"; } + { url = "https://machinefossil.net/feed.xml"; } + { url = "https://matrix.org/blog/feed"; } + { url = "https://mau.fi/blog/index.rss"; } + { url = "https://medium.com/feed/@ericmigi"; } + { url = "https://neilalexander.dev/feed.xml"; } + { url = "https://pointlessramblings.com/index.xml"; } + { url = "https://skip.house/rss.xml"; } + { url = "https://textslashplain.com/feed/"; } + { url = "https://tgrcode.com/rss"; } + { url = "https://weekly.nixos.org/feeds/all.rss.xml"; } + { url = "https://www.joelonsoftware.com/feed/"; } + { url = "https://www.thedroneely.com/posts/rss.xml"; } + { url = "https://www.wheresyoured.at/rss/"; } + ]; + }]; + } + ]; + 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}"; + }; + }; +}