feat: add homepage icons and Home Assistant entry

This commit is contained in:
marthsincemelee
2026-04-20 16:34:27 +02:00
parent 004f04eca5
commit 2d43ed36ea
12 changed files with 39 additions and 2 deletions
+1
View File
@@ -36,6 +36,7 @@ in
name = "Actual"; name = "Actual";
description = "Budgeting"; description = "Budgeting";
href = "http://${hostName}:${toString port}"; href = "http://${hostName}:${toString port}";
icon = "mdi-cash";
} }
]; ];
@@ -33,6 +33,7 @@ in
name = "Audiobookshelf"; name = "Audiobookshelf";
description = "Audiobooks and podcasts"; description = "Audiobooks and podcasts";
href = "http://${hostName}:63834"; href = "http://${hostName}:63834";
icon = "audiobookshelf.png";
} }
]; ];
@@ -7,6 +7,7 @@
}: }:
let let
cfg = config.my.profiles.home-assistant; cfg = config.my.profiles.home-assistant;
hostName = config.networking.hostName;
in in
{ {
options.my.profiles.home-assistant = with lib; { options.my.profiles.home-assistant = with lib; {
@@ -25,5 +26,15 @@ in
name = "Home - Rechberg"; name = "Home - Rechberg";
unit_system = "metric"; unit_system = "metric";
}; };
my.homepage.services = [
{
group = "Home";
name = "Home Assistant";
description = "Home automation";
href = "http://${hostName}:8123";
icon = "si-homeassistant";
}
];
}; };
} }
+11 -2
View File
@@ -27,11 +27,14 @@ let
{ {
${group} = map ( ${group} = map (
entry: entry:
{ let
${entry.name} = builtins.removeAttrs entry [ service = builtins.removeAttrs entry [
"group" "group"
"name" "name"
]; ];
in
{
${entry.name} = lib.filterAttrs (_: value: value != null) service;
} }
) entries; ) entries;
} }
@@ -62,6 +65,12 @@ in
type = types.str; type = types.str;
description = "Homepage service URL"; description = "Homepage service URL";
}; };
icon = mkOption {
type = types.nullOr types.str;
default = null;
description = "Optional Homepage service icon";
};
}; };
} }
); );
@@ -28,6 +28,7 @@ in
name = "Jellyfin"; name = "Jellyfin";
description = "Media server"; description = "Media server";
href = "http://${hostName}:${toString port}"; href = "http://${hostName}:${toString port}";
icon = "jellyfin.png";
} }
]; ];
@@ -22,6 +22,7 @@ in
name = "Jellyseerr"; name = "Jellyseerr";
description = "Media requests"; description = "Media requests";
href = "http://${hostName}:${toString port}"; href = "http://${hostName}:${toString port}";
icon = "mdi-television-guide";
} }
]; ];
@@ -39,6 +39,7 @@ in
name = "Paperless"; name = "Paperless";
description = "Document management"; description = "Document management";
href = "http://${hostName}:${toString cfg.port}"; href = "http://${hostName}:${toString cfg.port}";
icon = "paperless-ngx.png";
} }
]; ];
@@ -29,6 +29,7 @@ in
name = "Prowlarr"; name = "Prowlarr";
description = "Indexer manager"; description = "Indexer manager";
href = "http://${hostName}:${toString port}"; href = "http://${hostName}:${toString port}";
icon = "prowlarr.png";
} }
]; ];
+1
View File
@@ -30,6 +30,7 @@ in
name = "Radarr"; name = "Radarr";
description = "Movie management"; description = "Movie management";
href = "http://${hostName}:${toString port}"; href = "http://${hostName}:${toString port}";
icon = "radarr.png";
} }
]; ];
+1
View File
@@ -30,6 +30,7 @@ in
name = "Readarr"; name = "Readarr";
description = "Book management"; description = "Book management";
href = "http://${hostName}:${toString port}"; href = "http://${hostName}:${toString port}";
icon = "readarr.png";
} }
]; ];
+1
View File
@@ -28,6 +28,7 @@ in
name = "Sonarr"; name = "Sonarr";
description = "Series management"; description = "Series management";
href = "http://${hostName}:${toString port}"; href = "http://${hostName}:${toString port}";
icon = "sonarr.png";
} }
]; ];
+8
View File
@@ -48,6 +48,13 @@ let
Optional homepage-dashboard description for this virtual host. Optional homepage-dashboard description for this virtual host.
''; '';
}; };
icon = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = ''
Optional homepage-dashboard icon for this virtual host.
'';
};
}; };
port = lib.mkOption { port = lib.mkOption {
type = with lib.types; nullOr port; type = with lib.types; nullOr port;
@@ -158,6 +165,7 @@ in
else else
"Web service"; "Web service";
href = "https://${vhost.subdomain}.${domain}"; href = "https://${vhost.subdomain}.${domain}";
icon = vhost.homepage.icon;
} }
) (builtins.filter (vhost: vhost.homepage.enable) cfg.virtualHosts); ) (builtins.filter (vhost: vhost.homepage.enable) cfg.virtualHosts);