diff --git a/modules/linux/glance.nix b/modules/linux/glance.nix new file mode 100644 index 0000000..8545bdd --- /dev/null +++ b/modules/linux/glance.nix @@ -0,0 +1,109 @@ +{ config, lib, pkgs, ... }: + +{ + services.glance = { + enable = true; + settings.server.port = 80; + settings.server.host = "0.0.0.0"; + openFirewall = true; + settings = { + pages = [ + { + name = "Home"; + hide-desktop-navigation = true; + columns = [ + { + size = "full"; + widgets = [ + { + type = "split-column"; + widgets = [ + { + type = "clock"; + hour-format = "24h"; + timezones = [ + { + timezone = "Australia/Sydney"; + label = "Sydney"; + } + { + timezone = "Europe/London"; + label = "London"; + } + { + timezone = "Europe/Moscow"; + label = "Moscow"; + } + ]; + } + { + type = "weather"; + location = "Sydney, Australia"; + units = "metric"; # alternatively "imperial" + hour-format = "12h"; # alternatively "24h" + } + ]; + } + { + type = "bookmarks"; + groups = [ + { + title = "Media"; + color = "10 70 50"; + links = [ + { + title = "Jellyfin"; + url = "http://10.0.0.32:8096"; + } + { + title = "Jellyseer"; + url = "http://10.0.0.32:5055"; + } + { + title = "Radarr"; + url = "http://10.0.0.32:7878"; + } + { + title = "Sonarr"; + url = "http://10.0.0.32:8989"; + } + { + title = "Lidarr"; + url = "http://10.0.0.32:8686"; + } + { + title = "Prowlarr"; + url = "http://10.0.0.32:9696"; + } + { + title = "Bazarr"; + url = "http://10.0.0.32:6767"; + } + { + title = "Deluge"; + url = "http://10.0.0.32:8112"; + } + ]; + } + ]; + } + ]; + } + { + size = "small"; + widgets = [ + { + type = "calendar"; + first-day-of-week = "monday"; + } + ]; + } + ]; + } + ]; + }; + }; + + # allow services to bind to port 80 + boot.kernel.sysctl."net.ipv4.ip_unprivileged_port_start" = 0; +}