Merge branch 'feature/homepage-widgets' into 'master'
Feature/homepage widgets See merge request finn.markwitz/nixos!14
This commit is contained in:
@@ -23,6 +23,7 @@ in
|
|||||||
jellyseerr.enable = true;
|
jellyseerr.enable = true;
|
||||||
development.enable = true;
|
development.enable = true;
|
||||||
home-assistant.enable = true;
|
home-assistant.enable = true;
|
||||||
|
|
||||||
homepage.enable = true;
|
homepage.enable = true;
|
||||||
paperless = {
|
paperless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -35,6 +36,33 @@ in
|
|||||||
prowlarr.enable = true;
|
prowlarr.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# my.homepage.widgets = [
|
||||||
|
# {
|
||||||
|
# search = {
|
||||||
|
# provider = "google";
|
||||||
|
# target = "_blank";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# resources = {
|
||||||
|
# cpu = true;
|
||||||
|
# memory = true;
|
||||||
|
# disk = "/";
|
||||||
|
# cacheInterval = 5000;
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# {
|
||||||
|
# datetime = {
|
||||||
|
# text_size = "xl";
|
||||||
|
# format = {
|
||||||
|
# timeStyle = "short";
|
||||||
|
# dateStyle = "short";
|
||||||
|
# hour12 = false;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
|
||||||
my.hardware = {
|
my.hardware = {
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
sound.enable = false;
|
sound.enable = false;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ in
|
|||||||
|
|
||||||
my.homepage.services = [
|
my.homepage.services = [
|
||||||
{
|
{
|
||||||
group = "Home";
|
group = "Services";
|
||||||
name = "Home Assistant";
|
name = "Home Assistant";
|
||||||
description = "Home automation";
|
description = "Home automation";
|
||||||
href = "http://${hostName}:8123";
|
href = "http://${hostName}:8123";
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
{
|
{
|
||||||
Github = [
|
Github = [
|
||||||
{
|
{
|
||||||
abbr = "GH";
|
abbr = "GitLab - Smoothcloud";
|
||||||
href = "https://github.com/";
|
href = "https://gitlab.smoothcloud.de/";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ let
|
|||||||
dashboardHost = config.networking.hostName;
|
dashboardHost = config.networking.hostName;
|
||||||
dashboardUrl = "http://${dashboardHost}:${toString dashboardPort}";
|
dashboardUrl = "http://${dashboardHost}:${toString dashboardPort}";
|
||||||
manualServices = import ./manual-services.nix;
|
manualServices = import ./manual-services.nix;
|
||||||
|
manualWidgets = import ./manual-widgets.nix;
|
||||||
|
|
||||||
groupedServices =
|
groupedServices =
|
||||||
lib.foldl'
|
lib.foldl'
|
||||||
@@ -79,6 +80,12 @@ in
|
|||||||
description = "Merged homepage service metadata contributed by repo modules.";
|
description = "Merged homepage service metadata contributed by repo modules.";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
options.my.homepage.widgets = with lib; mkOption {
|
||||||
|
type = types.listOf types.attrs;
|
||||||
|
default = [ ];
|
||||||
|
description = "Widget definitions passed directly to services.homepage-dashboard.widgets. Each entry is an attrset like { resources = { cpu = true; memory = true; }; }.";
|
||||||
|
};
|
||||||
|
|
||||||
options.my.profiles.homepage = with lib; {
|
options.my.profiles.homepage = with lib; {
|
||||||
enable = mkEnableOption "getHomepage.dev Dashboard";
|
enable = mkEnableOption "getHomepage.dev Dashboard";
|
||||||
};
|
};
|
||||||
@@ -90,6 +97,7 @@ in
|
|||||||
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 ++ manualServices;
|
services = homepageServices ++ manualServices;
|
||||||
|
widgets = config.my.homepage.widgets ++ manualWidgets;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.finn.packages = with pkgs; [
|
users.users.finn.packages = with pkgs; [
|
||||||
|
|||||||
@@ -1,14 +1,28 @@
|
|||||||
[
|
[
|
||||||
# Example:
|
# Example:
|
||||||
# {
|
{
|
||||||
# "Infrastructure" = [
|
"Services" = [
|
||||||
# {
|
{
|
||||||
# "Proxmox" = {
|
"Tesla - Dashboard" = {
|
||||||
# href = "https://proxmox.example.local";
|
href = "https://grafana.smoothcloud.de";
|
||||||
# description = "Virtualization host";
|
description = "Tesla Information";
|
||||||
# icon = "proxmox.png";
|
icon = "tesla.png";
|
||||||
# };
|
};
|
||||||
# }
|
}
|
||||||
# ];
|
{
|
||||||
# }
|
"GitLab" = {
|
||||||
|
href = "https://gitlab.smoothcloud.de";
|
||||||
|
description = "Selfhosted GitLab";
|
||||||
|
icon = "gitlab.png";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"Nextcloud" = {
|
||||||
|
href = "https://next.smoothcloud.de";
|
||||||
|
description = "Selfhosted Cloud Service";
|
||||||
|
icon = "nextcloud.png";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
[
|
||||||
|
# Example:
|
||||||
|
{ resources = { cpu = true; memory = true; disk = "/"; }; }
|
||||||
|
{ datetime = { text_size = "xl"; format = { timeStyle = "short"; }; }; }
|
||||||
|
{ search = {provider = "google"; focus = true; target = "_blank"; }; }
|
||||||
|
]
|
||||||
@@ -35,7 +35,7 @@ in
|
|||||||
|
|
||||||
my.homepage.services = [
|
my.homepage.services = [
|
||||||
{
|
{
|
||||||
group = "Documents";
|
group = "Services";
|
||||||
name = "Paperless";
|
name = "Paperless";
|
||||||
description = "Document management";
|
description = "Document management";
|
||||||
href = "http://${hostName}:${toString cfg.port}";
|
href = "http://${hostName}:${toString cfg.port}";
|
||||||
|
|||||||
Reference in New Issue
Block a user