297 current 2025-10-11 13:48:37 25.05.20251006.20c4598 6.12.50 *

This commit is contained in:
2025-10-11 14:20:33 -05:00
parent eec5b89396
commit 09603e8e30
4 changed files with 47 additions and 17 deletions

View File

@@ -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 = {

View File

@@ -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 ]; };

View File

@@ -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 ]; };

View File

@@ -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";