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";
description = "Budgeting";
href = "http://${hostName}:${toString port}";
icon = "mdi-cash";
}
];
@@ -33,6 +33,7 @@ in
name = "Audiobookshelf";
description = "Audiobooks and podcasts";
href = "http://${hostName}:63834";
icon = "audiobookshelf.png";
}
];
@@ -7,6 +7,7 @@
}:
let
cfg = config.my.profiles.home-assistant;
hostName = config.networking.hostName;
in
{
options.my.profiles.home-assistant = with lib; {
@@ -25,5 +26,15 @@ in
name = "Home - Rechberg";
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 (
entry:
{
${entry.name} = builtins.removeAttrs entry [
let
service = builtins.removeAttrs entry [
"group"
"name"
];
in
{
${entry.name} = lib.filterAttrs (_: value: value != null) service;
}
) entries;
}
@@ -62,6 +65,12 @@ in
type = types.str;
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";
description = "Media server";
href = "http://${hostName}:${toString port}";
icon = "jellyfin.png";
}
];
@@ -22,6 +22,7 @@ in
name = "Jellyseerr";
description = "Media requests";
href = "http://${hostName}:${toString port}";
icon = "mdi-television-guide";
}
];
@@ -39,6 +39,7 @@ in
name = "Paperless";
description = "Document management";
href = "http://${hostName}:${toString cfg.port}";
icon = "paperless-ngx.png";
}
];
@@ -29,6 +29,7 @@ in
name = "Prowlarr";
description = "Indexer manager";
href = "http://${hostName}:${toString port}";
icon = "prowlarr.png";
}
];
+1
View File
@@ -30,6 +30,7 @@ in
name = "Radarr";
description = "Movie management";
href = "http://${hostName}:${toString port}";
icon = "radarr.png";
}
];
+1
View File
@@ -30,6 +30,7 @@ in
name = "Readarr";
description = "Book management";
href = "http://${hostName}:${toString port}";
icon = "readarr.png";
}
];
+1
View File
@@ -28,6 +28,7 @@ in
name = "Sonarr";
description = "Series management";
href = "http://${hostName}:${toString port}";
icon = "sonarr.png";
}
];
+8
View File
@@ -48,6 +48,13 @@ let
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 {
type = with lib.types; nullOr port;
@@ -158,6 +165,7 @@ in
else
"Web service";
href = "https://${vhost.subdomain}.${domain}";
icon = vhost.homepage.icon;
}
) (builtins.filter (vhost: vhost.homepage.enable) cfg.virtualHosts);