diff --git a/hosts/nixedo/homelab.nix b/hosts/nixedo/homelab.nix index b3a44381..3c00336d 100644 --- a/hosts/nixedo/homelab.nix +++ b/hosts/nixedo/homelab.nix @@ -9,7 +9,6 @@ services = { audiobookshelf.enable = true; home-assistant.enable = true; - homepage-dashboard.enable = true; freshrss.enable = true; paperless.enable = true; peertube.enable = true; diff --git a/hosts/nixedo/modules/audiobookshelf.nix b/hosts/nixedo/modules/audiobookshelf.nix index 8e30bdd4..9ccf8511 100644 --- a/hosts/nixedo/modules/audiobookshelf.nix +++ b/hosts/nixedo/modules/audiobookshelf.nix @@ -15,26 +15,6 @@ in default = "audiobookshelf.${homelab.domain}"; type = types.str; }; - - homepage.name = mkOption { - default = "Audiobookshelf"; - type = types.str; - }; - - homepage.description = mkOption { - default = "Self-hosted audiobook and podcast server"; - type = types.str; - }; - - homepage.icon = mkOption { - default = "audiobookshelf"; - type = types.str; - }; - - homepage.category = mkOption { - default = "Media"; - type = types.str; - }; }; config = mkIf cfg.enable { diff --git a/hosts/nixedo/modules/containers/tubearchivist.nix b/hosts/nixedo/modules/containers/tubearchivist.nix index 1f8c35ae..1e308682 100644 --- a/hosts/nixedo/modules/containers/tubearchivist.nix +++ b/hosts/nixedo/modules/containers/tubearchivist.nix @@ -23,26 +23,6 @@ in default = "${service}.${homelab.domain}"; type = types.str; }; - - homepage.name = mkOption { - default = "Tube Archivist"; - type = types.str; - }; - - homepage.description = mkOption { - default = "Your self hosted YouTube media server"; - type = types.str; - }; - - homepage.icon = mkOption { - default = "tube-archivist"; - type = types.str; - }; - - homepage.category = mkOption { - default = "Media"; - type = types.str; - }; }; config = mkIf cfg.enable { diff --git a/hosts/nixedo/modules/home-assistant.nix b/hosts/nixedo/modules/home-assistant.nix index 2995ade3..88b35b35 100644 --- a/hosts/nixedo/modules/home-assistant.nix +++ b/hosts/nixedo/modules/home-assistant.nix @@ -15,26 +15,6 @@ in default = "home.${homelab.domain}"; type = types.str; }; - - homepage.name = mkOption { - default = "Home Assisant"; - type = types.str; - }; - - homepage.description = mkOption { - default = "Open source home automation that puts local control and privacy first."; - type = types.str; - }; - - homepage.icon = mkOption { - default = "home-assistant"; - type = types.str; - }; - - homepage.category = mkOption { - default = "Services"; - type = types.str; - }; }; config = mkIf cfg.enable { diff --git a/hosts/nixedo/modules/paperless.nix b/hosts/nixedo/modules/paperless.nix index 33fd9801..4cb73ad8 100644 --- a/hosts/nixedo/modules/paperless.nix +++ b/hosts/nixedo/modules/paperless.nix @@ -15,26 +15,6 @@ in default = "${service}.${homelab.domain}"; type = types.str; }; - - homepage.name = mkOption { - default = "Paperless-ngx"; - type = types.str; - }; - - homepage.description = mkOption { - default = "Document management system"; - type = types.str; - }; - - homepage.icon = mkOption { - default = "paperless"; - type = types.str; - }; - - homepage.category = mkOption { - default = "Services"; - type = types.str; - }; }; config = mkIf cfg.enable { diff --git a/hosts/nixedo/modules/peertube.nix b/hosts/nixedo/modules/peertube.nix index a35e3f01..25c90a01 100644 --- a/hosts/nixedo/modules/peertube.nix +++ b/hosts/nixedo/modules/peertube.nix @@ -25,26 +25,6 @@ in default = "videos.${homelab.domain}"; type = types.str; }; - - homepage.name = mkOption { - default = "Peertube"; - type = types.str; - }; - - homepage.description = mkOption { - default = "A free and open-source, decentralized, ActivityPub federated video platform"; - type = types.str; - }; - - homepage.icon = mkOption { - default = "peertube"; - type = types.str; - }; - - homepage.category = mkOption { - default = "Media"; - type = types.str; - }; }; config = mkIf cfg.enable { diff --git a/hosts/nixedo/ports.nix b/hosts/nixedo/ports.nix index 05bda7ff..50379727 100644 --- a/hosts/nixedo/ports.nix +++ b/hosts/nixedo/ports.nix @@ -10,7 +10,6 @@ in }; config.homelab.ports = { - homepage-dashboard = 8097; mealie = 9001; pihole = 8082; tubearchivist = 8099; diff --git a/hosts/nixedo/services/default.nix b/hosts/nixedo/services/default.nix index a0d1900a..4bf7c492 100644 --- a/hosts/nixedo/services/default.nix +++ b/hosts/nixedo/services/default.nix @@ -7,7 +7,6 @@ { imports = [ - ./homepage ./mealie.nix ./samba.nix ./uptime-kuma.nix diff --git a/hosts/nixedo/services/homepage/default.nix b/hosts/nixedo/services/homepage/default.nix deleted file mode 100644 index df0b543b..00000000 --- a/hosts/nixedo/services/homepage/default.nix +++ /dev/null @@ -1,63 +0,0 @@ -{ config, lib, ... }: - -with lib; - -let - cfg = homelab.services.${service}; - homelab = config.homelab; - service = "homepage-dashboard"; -in -{ - options.homelab.services.${service} = { - enable = mkEnableOption "Enable ${service}"; - - url = mkOption { - default = "${config.networking.hostName}.${homelab.domain}"; - type = types.str; - }; - }; - - config = mkIf cfg.enable { - services = { - ${service} = { - enable = true; - listenPort = homelab.ports.${service}; - openFirewall = true; - - customCSS = '' - #information-widgets { - padding-left: 1.5rem; - padding-right: 1.5rem; - } - - div#footer { - display: none; - } - - .services-group { - margin-bottom: 3rem; - } - ''; - - services = (import ./services.nix { inherit config lib; }); - - settings = { - headerStyle = "clean"; - hideVersion = "true"; - layout = (import ./layout.nix); - statusStyle = "dot"; - }; - }; - - glances.enable = true; - - nginx.virtualHosts.${cfg.url} = { - forceSSL = true; - useACMEHost = homelab.domain; - - locations."/".proxyPass = - "http://localhost:${toString config.services.homepage-dashboard.listenPort}"; - }; - }; - }; -} diff --git a/hosts/nixedo/services/homepage/glances.nix b/hosts/nixedo/services/homepage/glances.nix deleted file mode 100644 index ebcd3622..00000000 --- a/hosts/nixedo/services/homepage/glances.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ config }: - -{ - Glances = - let - port = toString config.services.glances.port; - in - [ - { - Info = { - widget = { - type = "glances"; - url = "http://localhost:${port}"; - metric = "info"; - chart = false; - version = 4; - }; - }; - } - - { - "CPU Temp" = { - widget = { - type = "glances"; - url = "http://localhost:${port}"; - metric = "sensor:Package id 0"; - chart = false; - version = 4; - }; - }; - } - - { - Processes = { - widget = { - type = "glances"; - url = "http://localhost:${port}"; - metric = "process"; - chart = false; - version = 4; - }; - }; - } - - { - Network = { - widget = { - type = "glances"; - url = "http://localhost:${port}"; - metric = "network:enp0s20f0u1"; - chart = false; - version = 4; - }; - }; - } - ]; -} diff --git a/hosts/nixedo/services/homepage/layout.nix b/hosts/nixedo/services/homepage/layout.nix deleted file mode 100644 index b0b05b94..00000000 --- a/hosts/nixedo/services/homepage/layout.nix +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - Glances = { - columns = 4; - header = false; - style = "row"; - }; - } - - { - Media = { - header = true; - style = "column"; - }; - } - - { - Services = { - header = true; - style = "column"; - }; - } -] diff --git a/hosts/nixedo/services/homepage/services.nix b/hosts/nixedo/services/homepage/services.nix deleted file mode 100644 index 52c8cec8..00000000 --- a/hosts/nixedo/services/homepage/services.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ config, lib }: - -with lib; - -let - homelab = config.homelab.services; - - homepageCategories = [ - "Media" - "Services" - ]; - - homepageServices = - category: - (attrsets.filterAttrs ( - name: value: value ? homepage && value.homepage.category == category - ) homelab); - - services = lists.forEach homepageCategories (cat: { - "${cat}" = - lib.lists.forEach (lib.attrsets.mapAttrsToList (name: value: name) (homepageServices "${cat}")) - (x: { - "${homelab.${x}.homepage.name}" = { - icon = homelab.${x}.homepage.icon; - description = homelab.${x}.homepage.description; - href = "https://${homelab.${x}.url}"; - siteMonitor = "https://${homelab.${x}.url}"; - }; - }); - }); -in -services ++ [ (import ./glances.nix { inherit config; }) ] diff --git a/hosts/nixedo/services/uptime-kuma.nix b/hosts/nixedo/services/uptime-kuma.nix index 2bdb1487..52dd8ed5 100644 --- a/hosts/nixedo/services/uptime-kuma.nix +++ b/hosts/nixedo/services/uptime-kuma.nix @@ -15,26 +15,6 @@ in default = "uptime.${homelab.domain}"; type = types.str; }; - - homepage.name = mkOption { - default = "Uptime Kuma"; - type = types.str; - }; - - homepage.description = mkOption { - default = "A fancy self-hosted monitoring tool"; - type = types.str; - }; - - homepage.icon = mkOption { - default = "uptime-kuma"; - type = types.str; - }; - - homepage.category = mkOption { - default = "Services"; - type = types.str; - }; }; config = mkIf cfg.enable { diff --git a/modules/nixvim/completion/snippets/nix.lua b/modules/nixvim/completion/snippets/nix.lua index 8e454963..76254b27 100644 --- a/modules/nixvim/completion/snippets/nix.lua +++ b/modules/nixvim/completion/snippets/nix.lua @@ -1,39 +1,6 @@ return { s("home_packages", fmta("home.packages = with pkgs; [ <> ];", i(0))), - s( - "homepage_options", - fmta( - [[ - homepage.name = mkOption { - default = ""; - type = types.str; - }; - - homepage.description = mkOption { - default = ""; - type = types.str; - }; - - homepage.icon = mkOption { - default = ""; - type = types.str; - }; - - homepage.category = mkOption { - default = ""; - type = types.str; - }; - ]], - { - description = i(2), - finish = i(0), - icon = i(3), - name = i(1), - } - ) - ), - s( "imports", fmta(