diff --git a/hosts/h001/containers/default.nix b/hosts/h001/containers/default.nix index 2e987c36..37c50cdb 100644 --- a/hosts/h001/containers/default.nix +++ b/hosts/h001/containers/default.nix @@ -5,7 +5,6 @@ imports = [ ./forgejo.nix ./opengist.nix - ./homarr.nix ./zitadel.nix ]; diff --git a/hosts/h001/containers/homarr.nix b/hosts/h001/containers/homarr.nix deleted file mode 100644 index 0cd11def..00000000 --- a/hosts/h001/containers/homarr.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - ... -}: -let - name = "homarr"; - hostDataDir = "/var/lib/${name}"; - - v_port = 7575; -in -{ - virtualisation.oci-containers.containers = { - "${name}" = { - image = "ghcr.io/homarr-labs/homarr:latest"; - ports = [ - "127.0.0.1:${toString v_port}:${toString v_port}" - ]; - volumes = [ - "${hostDataDir}:/appdata" - "/var/run/docker.sock:/var/run/docker.sock" - ]; - environment = { - SECRET_ENCRYPTION_KEY = "0b7e80116a742d16a8f07452a2d9b206b1997d32a6dd2c29cfe4df676e281295"; - }; - extraOptions = [ - "--add-host=h003:100.64.0.14" - ]; - }; - }; - - system.activationScripts."${name}_directories" = '' - mkdir -p ${hostDataDir} - chown -R root:root ${hostDataDir} - chmod -R 777 ${hostDataDir} - ''; -} diff --git a/hosts/h001/mods/default.nix b/hosts/h001/mods/default.nix index 3a476152..9946f3bb 100644 --- a/hosts/h001/mods/default.nix +++ b/hosts/h001/mods/default.nix @@ -13,6 +13,7 @@ ./n8n.nix ./postgresql.nix ./openbao.nix + ./homepage-dashboard.nix # ./vault.nix ]; } diff --git a/hosts/h001/mods/homepage-dashboard.nix b/hosts/h001/mods/homepage-dashboard.nix new file mode 100644 index 00000000..6d50517b --- /dev/null +++ b/hosts/h001/mods/homepage-dashboard.nix @@ -0,0 +1,161 @@ +let + section1 = "a. Public Apps"; + section2 = "b. Media*rrs"; + section3 = "c. Network"; +in +{ + services.homepage-dashboard = { + enable = true; + openFirewall = false; + allowedHosts = "*"; + settings = { + title = "Josh's Homelab"; + background = "https://w.wallhaven.cc/full/k9/wallhaven-k912lq.png"; + favicon = "https://twenty-icons.com/search.nixos.org"; + cardBlur = "xs"; + color = "neutral"; + theme = "dark"; + iconStyle = "theme"; + headerStyle = "clean"; + hideVersion = true; + disableUpdateCheck = true; + language = "en"; + layout = { + "${section1}" = { + style = "row"; + columns = 4; + }; + "${section2}" = { + style = "row"; + columns = 3; + }; + "${section3}" = { + style = "row"; + columns = 2; + }; + }; + }; + services = [ + { + "${section1}" = [ + { + "Git" = { + description = "Forgejo"; + href = "https://git.joshuabell.xyz"; + icon = "forgejo"; + # widgets = [ + # { + # type = "gitea"; + # url = "https://git.joshuabell.xyz"; + # key = "TODO"; + # hideErrors = true; + # } + # ]; + }; + } + { + "Gist" = { + description = "Opengist"; + href = "https://gist.joshuabell.xyz"; + icon = "opengist"; + }; + } + ]; + } + { + "${section2}" = [ + { + "Jellyfin" = { + description = "Media Streaming"; + href = "https://jellyfin.joshuabell.xyz"; + icon = "jellyfin"; + }; + } + { + "Jellyseerr" = { + description = "Media Requests"; + href = "https://media.joshuabell.xyz"; + icon = "jellyseerr"; + }; + } + { + "Pinchflat" = { + description = "YouTube Automation"; + href = "http://h001.net.joshuabell.xyz:8945"; + icon = "pinchflat"; + }; + } + { + "Radarr" = { + description = "Movie Automation"; + href = "http://h001.net.joshuabell.xyz:7878"; + icon = "radarr"; + }; + } + { + "Sonarr" = { + description = "Show Automation"; + href = "http://h001.net.joshuabell.xyz:8989"; + icon = "sonarr"; + }; + } + { + "Bazarr" = { + description = "Subtitle Automation"; + href = "http://h001.net.joshuabell.xyz:6767"; + icon = "bazarr"; + }; + } + { + "Prowlarr" = { + description = "Indexer Manager"; + href = "http://h001.net.joshuabell.xyz:9696"; + icon = "prowlarr"; + }; + } + { + "SABnzbd" = { + description = "Usenet Downloader"; + href = "http://h001.net.joshuabell.xyz:6336"; + icon = "sabnzbd"; + }; + } + { + "Transmission" = { + description = "Torrent Downloader"; + href = "http://h001.net.joshuabell.xyz:9091"; + icon = "transmission"; + }; + } + ]; + } + { + "${section3}" = [ + { + "AdGuard Home" = { + description = "Network-wide Ad-blocker"; + href = "http://h003.net.joshuabell.xyz:3000"; + icon = "adguard-home"; + widgets = [ + { + type = "adguard"; + url = "http://h003.net.joshuabell.xyz:3000/"; + username = "opidsjhpoidjsf"; + password = "TODO"; + hideErrors = true; + } + ]; + }; + } + { + "Beszel" = { + description = "Server Metrics"; + href = "http://h001.net.joshuabell.xyz:8090"; + icon = "beszel"; + }; + } + ]; + } + ]; + }; +} diff --git a/hosts/h001/nginx.nix b/hosts/h001/nginx.nix index 16022e07..c4e61c55 100644 --- a/hosts/h001/nginx.nix +++ b/hosts/h001/nginx.nix @@ -4,9 +4,9 @@ ... }: let - homarr = { + homepage = { proxyWebsockets = true; - proxyPass = "http://localhost:7575"; + proxyPass = "http://localhost:8082"; }; hasSecret = secret: @@ -49,7 +49,7 @@ in }; "h001.local.joshuabell.xyz" = { locations = { - "/" = homarr; + "/" = homepage; }; }; "100.64.0.13" = { @@ -59,7 +59,7 @@ in }; "h001.net.joshuabell.xyz" = { locations = { - "/" = homarr; + "/" = homepage; }; };