diff --git a/.github/workflows/homepage.yaml b/.github/workflows/homepage.yaml deleted file mode 100644 index e171d2a0..00000000 --- a/.github/workflows/homepage.yaml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Deploy homepage - -on: # yamllint disable-line rule:truthy - push: - branches: - - main - paths: - - roles/homepage/** - - .github/workflows/homepage.yaml - pull_request: - paths: - - roles/homepage/** - - .github/workflows/homepage.yaml - -jobs: - homepage: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4.1.7 - - uses: ./.github/actions/setup-ansible - - run: | - docker network create --driver bridge proxy - - ansible-playbook main.yaml --limit localhost --tags homepage - - docker ps --filter name=homepage | grep --quiet homepage diff --git a/group_vars/smarthome.yaml b/group_vars/smarthome.yaml index 6f095bf5..4e3a4dbb 100644 --- a/group_vars/smarthome.yaml +++ b/group_vars/smarthome.yaml @@ -1,5 +1,4 @@ --- docker_users: - ubuntu -tailscale_homepage_labels: true figurine_font: "Binary.flf" diff --git a/main.yaml b/main.yaml index 47bfbd36..cd002e5c 100644 --- a/main.yaml +++ b/main.yaml @@ -85,8 +85,6 @@ tags: mosquitto - role: traefik tags: traefik - - role: homepage - tags: homepage - role: homeassistant tags: homeassistant, autorestic - role: github_deploy diff --git a/nixos/hosts/chewbacca/default.nix b/nixos/hosts/chewbacca/default.nix index 9ebd7b72..4f368905 100644 --- a/nixos/hosts/chewbacca/default.nix +++ b/nixos/hosts/chewbacca/default.nix @@ -6,7 +6,6 @@ ./hardware-configuration.nix ./../../services/audiobookshelf.nix ./../../services/glances.nix - ./../../services/homepage.nix ./../../services/jellyfin.nix ./../../services/music-assistant.nix ./../../services/navidrome.nix diff --git a/nixos/hosts/luffy/default.nix b/nixos/hosts/luffy/default.nix index 01e55c96..5c0c2301 100644 --- a/nixos/hosts/luffy/default.nix +++ b/nixos/hosts/luffy/default.nix @@ -4,6 +4,7 @@ imports = [ ./hardware-configuration.nix + ./../../services/homepage.nix ]; # Nix stuff diff --git a/nixos/services/homepage.nix b/nixos/services/homepage.nix index 000ad2ef..45b90508 100644 --- a/nixos/services/homepage.nix +++ b/nixos/services/homepage.nix @@ -72,7 +72,7 @@ } { Audiobookshelf = { - href = "https://navidrome.media.hallstrom.duckdns.org"; + href = "https://audiobookshelf.media.hallstrom.duckdns.org"; icon = "audiobookshelf"; }; } @@ -84,6 +84,28 @@ } ]; } + { + Monitor = [ + { + "Gatus (RPi 3)" = { + href = "http://192.168.1.24:8080"; + icon = "gatus"; + }; + } + { + "Gatus (OCI 0)" = { + href = "http://100.117.82.95:8080"; + icon = "gatus"; + }; + } + { + "Gatus (OCI 1)" = { + href = "http://100.99.164.134:8080"; + icon = "gatus"; + }; + } + ]; + } ]; bookmarks = [ @@ -109,11 +131,4 @@ } ]; }; - - services.nginx.virtualHosts."homepage.media.hallstrom.duckdns.org" = { - useACMEHost = "hallstrom.duckdns.org"; - acmeRoot = null; - forceSSL = true; - locations."/" = { proxyPass = "http://127.0.0.1:8082"; proxyWebsockets = true; }; - }; } diff --git a/nixos/services/traefik/dynamic.yaml b/nixos/services/traefik/dynamic.yaml index 2560b0a7..8ba94cd9 100644 --- a/nixos/services/traefik/dynamic.yaml +++ b/nixos/services/traefik/dynamic.yaml @@ -5,8 +5,18 @@ http: rule: "Host(`traefik.hallstrom.duckdns.org`)" service: api@internal + homepage: + rule: "Host(`homepage.hallstrom.duckdns.org`)" + service: homepage + middlewares: sslheader: headers: customrequestheaders: X-Forwarded-Proto: https + + services: + homepage: + loadbalancer: + servers: + - url: "http://0.0.0.0:8082" diff --git a/roles/duckdns/templates/compose.yaml.j2 b/roles/duckdns/templates/compose.yaml.j2 index 1c82ffb1..597ec3b7 100644 --- a/roles/duckdns/templates/compose.yaml.j2 +++ b/roles/duckdns/templates/compose.yaml.j2 @@ -9,8 +9,3 @@ services: - SUBDOMAINS={{ duckdns_domain }} - TOKEN={{ duckdns_token }} restart: unless-stopped - labels: - - homepage.group=Network - - homepage.name=Duck DNS - - homepage.icon=duckdns - - homepage.href=https://www.duckdns.org/ diff --git a/roles/homeassistant/templates/compose.yaml.j2 b/roles/homeassistant/templates/compose.yaml.j2 index 15da7ca7..585abdf8 100644 --- a/roles/homeassistant/templates/compose.yaml.j2 +++ b/roles/homeassistant/templates/compose.yaml.j2 @@ -18,7 +18,3 @@ services: - traefik.http.routers.homeassistant.tls=true - traefik.http.routers.homeassistant.service=homeassistant - traefik.http.services.homeassistant.loadbalancer.server.port=8123 - - homepage.group=Smart Home - - homepage.name=Home Assistant - - homepage.icon=home-assistant - - homepage.href=https://homeassistant.{{ domain }} diff --git a/roles/homepage/files/bookmarks.yaml b/roles/homepage/files/bookmarks.yaml deleted file mode 100644 index 38c59770..00000000 --- a/roles/homepage/files/bookmarks.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- Bookmarks: - - Smart-Home: - - href: https://github.com/claha/smart-home - icon: mdi-home - - dotfiles: - - href: https://github.com/claha/dotfiles - icon: mdi-file diff --git a/roles/homepage/files/docker.yaml b/roles/homepage/files/docker.yaml deleted file mode 100644 index 0b9e41d8..00000000 --- a/roles/homepage/files/docker.yaml +++ /dev/null @@ -1,3 +0,0 @@ ---- -local-docker: - socket: /var/run/docker.sock diff --git a/roles/homepage/files/kubernetes.yaml b/roles/homepage/files/kubernetes.yaml deleted file mode 100644 index ed97d539..00000000 --- a/roles/homepage/files/kubernetes.yaml +++ /dev/null @@ -1 +0,0 @@ ---- diff --git a/roles/homepage/files/settings.yaml b/roles/homepage/files/settings.yaml deleted file mode 100644 index cae644f6..00000000 --- a/roles/homepage/files/settings.yaml +++ /dev/null @@ -1,2 +0,0 @@ ---- -language: en diff --git a/roles/homepage/files/widgets.yaml b/roles/homepage/files/widgets.yaml deleted file mode 100644 index c483c63d..00000000 --- a/roles/homepage/files/widgets.yaml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- resources: - cpu: false - memory: false - disk: false - cputemp: false - uptime: false - units: metric diff --git a/roles/homepage/tasks/main.yaml b/roles/homepage/tasks/main.yaml deleted file mode 100644 index f7a3260b..00000000 --- a/roles/homepage/tasks/main.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -- name: Create docker compose service - ansible.builtin.include_role: - name: docker_compose_service - vars: - docker_compose_service_name: homepage - docker_compose_service_sub_directories: - - config - docker_compose_service_template: true - docker_compose_service_extra_files: - - config/bookmarks.yaml - - config/docker.yaml - - config/kubernetes.yaml - - config/settings.yaml - - config/widgets.yaml - docker_compose_service_extra_templates: - - config/services.yaml diff --git a/roles/homepage/templates/compose.yaml.j2 b/roles/homepage/templates/compose.yaml.j2 deleted file mode 100644 index 873e2bf9..00000000 --- a/roles/homepage/templates/compose.yaml.j2 +++ /dev/null @@ -1,25 +0,0 @@ ---- -services: - homepage: - image: ghcr.io/gethomepage/homepage:v0.9.6 - container_name: homepage - environment: - - TZ=Europe/Stockholm - volumes: - - ./config:/app/config - - /var/run/docker.sock:/var/run/docker.sock:ro - networks: - - proxy - security_opt: - - no-new-privileges:true - restart: unless-stopped - labels: - - traefik.enable=true - - traefik.http.routers.homepage.rule=Host(`homepage.{{ domain }}`) - - traefik.http.routers.homepage.tls=true - - traefik.http.routers.homepage.service=homepage - - traefik.http.services.homepage.loadbalancer.server.port=3000 - -networks: - proxy: - external: true diff --git a/roles/homepage/templates/services.yaml.j2 b/roles/homepage/templates/services.yaml.j2 deleted file mode 100644 index 380cf02a..00000000 --- a/roles/homepage/templates/services.yaml.j2 +++ /dev/null @@ -1,50 +0,0 @@ ---- -- Network: - - Router: - href: {{ router_href | default() }} - icon: asus-router - - Ruckus Switch: - href: https://{{ ruckus_switch_ip }} - icon: https://avatars.githubusercontent.com/u/66272752?s=200&v=4 - - Ruckus Access Point: - href: https://{{ ruckus_access_point_ip }} - icon: https://avatars.githubusercontent.com/u/66272752?s=200&v=4 - - Pi-hole (primary): - href: {{ pihole_primary_href | default() }} - icon: pi-hole - - Pi-hole (secondary): - href: {{ pihole_secondary_href | default() }} - icon: pi-hole - -- Smart Home: - - Zigbee2Mqtt: - href: {{ zigbee2mqtt_href | default() }} - icon: zigbee2mqtt - -- Media: - - Navidrome: - href: {{ navidrome_href | default() }} - icon: navidrome - - Jellyfin: - href: {{ jellyfin_href | default() }} - icon: jellyfin - - Audiobookshelf: - href: {{ audiobookshelf_href | default() }} - icon: audiobookshelf - -- Monitor: - - Gatus (RPi 3): - href: http://{{ rpi3_ip | default() }}:8080 - icon: gatus - - Gatus (OCI 0): - href: {{ gatus0_href | default() }} - icon: gatus - - Gatus (OCI 1): - href: {{ gatus1_href | default() }} - icon: gatus - - Healthchecks (OCI 0): - href: {{ healthchecks0_href | default() }} - icon: healthchecks - - Healthchecks (OCI 1): - href: {{ healthchecks1_href | default() }} - icon: healthchecks diff --git a/roles/mosquitto/files/compose.yaml b/roles/mosquitto/files/compose.yaml index 73a97904..6e897dd0 100644 --- a/roles/mosquitto/files/compose.yaml +++ b/roles/mosquitto/files/compose.yaml @@ -15,7 +15,3 @@ services: - ./data:/mosquitto/data - ./log:/mosquitto/log restart: unless-stopped - labels: - - homepage.group=Smart Home - - homepage.name=Mosquitto - - homepage.icon=mqtt diff --git a/roles/tailscale/defaults/main.yaml b/roles/tailscale/defaults/main.yaml index 88ddd3d8..f9b2f358 100644 --- a/roles/tailscale/defaults/main.yaml +++ b/roles/tailscale/defaults/main.yaml @@ -1,3 +1,2 @@ --- -tailscale_homepage_labels: false tailscale_docker: true diff --git a/roles/tailscale/templates/compose.yaml.j2 b/roles/tailscale/templates/compose.yaml.j2 index a565a55b..d3a7b5d4 100644 --- a/roles/tailscale/templates/compose.yaml.j2 +++ b/roles/tailscale/templates/compose.yaml.j2 @@ -14,10 +14,3 @@ services: - NET_RAW restart: unless-stopped command: tailscaled -{% if tailscale_homepage_labels %} - labels: - - homepage.group=Network - - homepage.name=Tailscale - - homepage.icon=tailscale - - homepage.href=https://login.tailscale.com -{% endif %} diff --git a/roles/traefik/templates/compose.yaml.j2 b/roles/traefik/templates/compose.yaml.j2 index f191e1c3..ef4fa5e4 100644 --- a/roles/traefik/templates/compose.yaml.j2 +++ b/roles/traefik/templates/compose.yaml.j2 @@ -31,10 +31,6 @@ services: - traefik.http.routers.traefik.tls.domains[0].sans=*.{{ domain }} - traefik.http.routers.traefik.service=api@internal - traefik.http.services.traefik.loadbalancer.server.port=8080 - - homepage.group=Network - - homepage.name=Traefik - - homepage.icon=traefik - - homepage.href=https://traefik.{{ domain }} restart: unless-stopped networks: