Merge branch 'feature/homepage-icons' into 'master'

feat: add homepage icons and Home Assistant entry

See merge request finn.markwitz/nixos!13
This commit is contained in:
2026-04-22 09:55:34 +00:00
13 changed files with 55 additions and 3 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";
}
];
}; };
} }
+13 -3
View File
@@ -9,6 +9,7 @@ let
dashboardPort = 8082; dashboardPort = 8082;
dashboardHost = config.networking.hostName; dashboardHost = config.networking.hostName;
dashboardUrl = "http://${dashboardHost}:${toString dashboardPort}"; dashboardUrl = "http://${dashboardHost}:${toString dashboardPort}";
manualServices = import ./manual-services.nix;
groupedServices = groupedServices =
lib.foldl' lib.foldl'
@@ -27,11 +28,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 +66,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";
};
}; };
} }
); );
@@ -79,7 +89,7 @@ in
listenPort = dashboardPort; listenPort = dashboardPort;
allowedHosts = "${dashboardHost}:${toString dashboardPort},localhost:${toString dashboardPort},127.0.0.1:${toString dashboardPort},jupiter.solar.internal:${toString dashboardPort}"; allowedHosts = "${dashboardHost}:${toString dashboardPort},localhost:${toString dashboardPort},127.0.0.1:${toString dashboardPort},jupiter.solar.internal:${toString dashboardPort}";
bookmarks = import ./bookmarks.nix; bookmarks = import ./bookmarks.nix;
services = homepageServices; services = homepageServices ++ manualServices;
}; };
users.users.finn.packages = with pkgs; [ users.users.finn.packages = with pkgs; [
@@ -0,0 +1,14 @@
[
# Example:
# {
# "Infrastructure" = [
# {
# "Proxmox" = {
# href = "https://proxmox.example.local";
# description = "Virtualization host";
# icon = "proxmox.png";
# };
# }
# ];
# }
]
@@ -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);