From 09603e8e3034a5743891669a571b7d737336e5ab Mon Sep 17 00:00:00 2001 From: blake Date: Sat, 11 Oct 2025 14:20:33 -0500 Subject: [PATCH] 297 current 2025-10-11 13:48:37 25.05.20251006.20c4598 6.12.50 * --- flake.nix | 2 +- .../homelab/services/arr/radarr/default.nix | 10 +++++ .../homelab/services/arr/sonarr/default.nix | 9 ++++ modules/homelab/services/glance/default.nix | 43 ++++++++++++------- 4 files changed, 47 insertions(+), 17 deletions(-) diff --git a/flake.nix b/flake.nix index e006a91..9efd97c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,6 +1,6 @@ # flake for blakes nixos config # define new devices in outputs -# generation: 296 current 2025-10-11 13:35:39 25.05.20251006.20c4598 6.12.50 * +# generation: 297 current 2025-10-11 13:48:37 25.05.20251006.20c4598 6.12.50 * { description = "blakes nix config"; inputs = { diff --git a/modules/homelab/services/arr/radarr/default.nix b/modules/homelab/services/arr/radarr/default.nix index 3e40e1f..d9773bc 100644 --- a/modules/homelab/services/arr/radarr/default.nix +++ b/modules/homelab/services/arr/radarr/default.nix @@ -86,6 +86,16 @@ in }; }; + + modules.services.glance.link = { + radarr = { + description = "radarr"; + url = "http://10.10.0.30:3636"; + icon = "di:radarr"; + category = "mediastack"; # optional if you later implement category grouping + }; + }; + # add to backups modules.system.backups.baks = { ${service} = { paths = [ cfg.data_dir ]; }; diff --git a/modules/homelab/services/arr/sonarr/default.nix b/modules/homelab/services/arr/sonarr/default.nix index 4467165..120ccd2 100644 --- a/modules/homelab/services/arr/sonarr/default.nix +++ b/modules/homelab/services/arr/sonarr/default.nix @@ -84,6 +84,15 @@ in }; }; + modules.services.glance.link = { + sonarr = { + description = "Sonarr"; + url = "http://10.10.0.30:3636"; + icon = "di:sonarr"; + category = "mediastack"; # optional if you later implement category grouping + }; + }; + # add to backups modules.system.backups.baks = { ${service} = { paths = [ cfg.data_dir ]; }; diff --git a/modules/homelab/services/glance/default.nix b/modules/homelab/services/glance/default.nix index 30ce449..03a0c33 100644 --- a/modules/homelab/services/glance/default.nix +++ b/modules/homelab/services/glance/default.nix @@ -5,6 +5,14 @@ let cfg = config.modules.services.${service}; sec = config.sops.secrets; homelab = config.modules.homelab; + services = lib.attrsets.mapAttrsToList (name: srv: + { + title = srv.description; + icon = srv.icon; + url = srv.url; + allow-insecure = srv.icon; + } + ) config.modules.services.${service}.link; in { options.modules.services.${service} = { @@ -36,12 +44,13 @@ in default = true; description = "enable backups for ${service}"; }; - pages = lib.mkOption { + link = lib.mkOption { type = lib.types.attrsOf (lib.types.submodule { - options.description = lib.mkOption { type = lib.types.str; }; - options.url = lib.mkOption { type = lib.types.str; }; - options.icon = lib.mkOption { type = lib.types.str; }; - options.category = lib.mkOption { type = lib.types.str; }; + options.name = lib.mkOption { type = lib.types.str; }; + options.url = lib.mkOption { type = lib.types.str; }; + options.icon = lib.mkOption { type = lib.types.str; }; + options.allow-insecure = lib.mkOption { type = lib.types.str; default = false; }; + options.category = lib.mkOption { type = lib.types.str; }; }); default = {}; description = "configure the service for use in ${service}"; @@ -49,6 +58,7 @@ in }; config = lib.mkIf cfg.enable { + # declare ${service} group users.groups.${service} = { gid = lib.mkForce cfg.ids; }; @@ -111,17 +121,18 @@ in type = "monitor"; cache = "1m"; title = "mediastack"; - sites = [ - { title = "jellyfin"; url = "https://media.blakedheld.xyz"; icon = "di:jellyfin"; } - { title = "audiobookshelf"; url = "https://audiobooks.blakedheld.xyz"; icon = "di:audiobookshelf"; } - { title = "yacreader"; url = "http://10.10.0.30:3434"; icon = "/assets/icons/yacreader.png"; } - { title = "sonarr"; url = "http://10.10.0.30:3636"; icon = "di:sonarr"; } - { title = "qbittorrent"; url = "http://10.10.0.40:3333"; icon = "di:qbittorrent"; } - { title = "radarr"; url = "http://10.10.0.30:3737"; icon = "di:radarr"; } - { title = "kiwix"; url = "http://10.10.0.30:5050"; icon = "di:kiwix"; } - { title = "prowlarr"; url = "http://10.10.0.30:3535"; icon = "di:prowlarr"; } - { title = "bazarr"; url = "http://10.10.0.30:3838"; icon = "di:bazarr"; } - ]; + sites = services; +# sites = sites [ +# { title = "jellyfin"; url = "https://media.blakedheld.xyz"; icon = "di:jellyfin"; } +# { title = "audiobookshelf"; url = "https://audiobooks.blakedheld.xyz"; icon = "di:audiobookshelf"; } +# { title = "yacreader"; url = "http://10.10.0.30:3434"; icon = "/assets/icons/yacreader.png"; } +# { title = "sonarr"; url = "http://10.10.0.30:3636"; icon = "di:sonarr"; } +# { title = "qbittorrent"; url = "http://10.10.0.40:3333"; icon = "di:qbittorrent"; } +# { title = "radarr"; url = "http://10.10.0.30:3737"; icon = "di:radarr"; } +# { title = "kiwix"; url = "http://10.10.0.30:5050"; icon = "di:kiwix"; } +# { title = "prowlarr"; url = "http://10.10.0.30:3535"; icon = "di:prowlarr"; } +# { title = "bazarr"; url = "http://10.10.0.30:3838"; icon = "di:bazarr"; } +# ]; } { type = "monitor";