diff --git a/machines/jupiter/environments.nix b/machines/jupiter/environments.nix index 52a8712..c2ba90d 100644 --- a/machines/jupiter/environments.nix +++ b/machines/jupiter/environments.nix @@ -23,6 +23,7 @@ in jellyseerr.enable = true; development.enable = true; home-assistant.enable = true; + homepage.enable = true; paperless = { enable = true; @@ -35,6 +36,33 @@ in 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 = { bluetooth.enable = true; sound.enable = false; diff --git a/modules/environments/home-assistant/default.nix b/modules/environments/home-assistant/default.nix index 7e6259f..6d8b56c 100644 --- a/modules/environments/home-assistant/default.nix +++ b/modules/environments/home-assistant/default.nix @@ -29,7 +29,7 @@ in my.homepage.services = [ { - group = "Home"; + group = "Services"; name = "Home Assistant"; description = "Home automation"; href = "http://${hostName}:8123"; diff --git a/modules/environments/homepage/bookmarks.nix b/modules/environments/homepage/bookmarks.nix index d277db2..420c163 100644 --- a/modules/environments/homepage/bookmarks.nix +++ b/modules/environments/homepage/bookmarks.nix @@ -4,8 +4,8 @@ { Github = [ { - abbr = "GH"; - href = "https://github.com/"; + abbr = "GitLab - Smoothcloud"; + href = "https://gitlab.smoothcloud.de/"; } ]; } diff --git a/modules/environments/homepage/default.nix b/modules/environments/homepage/default.nix index b64dbcc..eadbd59 100644 --- a/modules/environments/homepage/default.nix +++ b/modules/environments/homepage/default.nix @@ -10,6 +10,7 @@ let dashboardHost = config.networking.hostName; dashboardUrl = "http://${dashboardHost}:${toString dashboardPort}"; manualServices = import ./manual-services.nix; + manualWidgets = import ./manual-widgets.nix; groupedServices = lib.foldl' @@ -79,6 +80,12 @@ in 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; { 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}"; bookmarks = import ./bookmarks.nix; services = homepageServices ++ manualServices; + widgets = config.my.homepage.widgets ++ manualWidgets; }; users.users.finn.packages = with pkgs; [ diff --git a/modules/environments/homepage/manual-services.nix b/modules/environments/homepage/manual-services.nix index 42c66de..d1ffb25 100644 --- a/modules/environments/homepage/manual-services.nix +++ b/modules/environments/homepage/manual-services.nix @@ -1,14 +1,28 @@ [ # Example: - # { - # "Infrastructure" = [ - # { - # "Proxmox" = { - # href = "https://proxmox.example.local"; - # description = "Virtualization host"; - # icon = "proxmox.png"; - # }; - # } - # ]; - # } + { + "Services" = [ + { + "Tesla - Dashboard" = { + href = "https://grafana.smoothcloud.de"; + description = "Tesla Information"; + 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"; + }; + } + ]; + } ] diff --git a/modules/environments/homepage/manual-widgets.nix b/modules/environments/homepage/manual-widgets.nix new file mode 100644 index 0000000..8f22441 --- /dev/null +++ b/modules/environments/homepage/manual-widgets.nix @@ -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"; }; } +] diff --git a/modules/environments/paperless/default.nix b/modules/environments/paperless/default.nix index f25a453..2a27b00 100644 --- a/modules/environments/paperless/default.nix +++ b/modules/environments/paperless/default.nix @@ -35,7 +35,7 @@ in my.homepage.services = [ { - group = "Documents"; + group = "Services"; name = "Paperless"; description = "Document management"; href = "http://${hostName}:${toString cfg.port}";