From 2173e37c0a6a76ab4c4da976a0a77a90bec3563e Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Thu, 16 Oct 2025 14:53:32 +0200 Subject: [PATCH] refactor: update configuration for mennos-server and adjust related tasks --- ansible/inventory.ini | 2 +- ansible/playbook.yml | 2 +- .../tasks/global/utils/smart-ssh/config.yaml | 6 +++ ansible/tasks/servers/dynamic-dns.yml | 2 +- ansible/tasks/servers/juicefs.yml | 2 +- ansible/tasks/servers/server.yml | 42 ++++++++-------- .../tasks/servers/services/caddy/Caddyfile.j2 | 2 +- .../tasks/servers/services/dashy/conf.yml.j2 | 48 +++++++++---------- .../services/sathub/docker-compose.yml.j2 | 6 +-- ansible/templates/juicefs.service.j2 | 2 +- config/autostart/Nextcloud.desktop | 11 +++++ config/autostart/equibop.desktop | 8 ++++ config/git.nix | 2 +- config/nextcloud.cfg | 8 ++++ flake.lock | 6 +-- flake.nix | 1 + 16 files changed, 92 insertions(+), 58 deletions(-) create mode 100644 config/autostart/Nextcloud.desktop create mode 100644 config/autostart/equibop.desktop create mode 100644 config/nextcloud.cfg diff --git a/ansible/inventory.ini b/ansible/inventory.ini index e17cb42..af5c765 100644 --- a/ansible/inventory.ini +++ b/ansible/inventory.ini @@ -4,5 +4,5 @@ mennos-desktop ansible_connection=local [servers] mennos-vps ansible_connection=local -mennos-desktop ansible_connection=local +mennos-server ansible_connection=local mennos-rtlsdr-pc ansible_connection=local \ No newline at end of file diff --git a/ansible/playbook.yml b/ansible/playbook.yml index 2d4c4d4..e8b405e 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -16,4 +16,4 @@ - name: Include server tasks ansible.builtin.import_tasks: tasks/servers/server.yml - when: inventory_hostname in ['mennos-vps', 'mennos-desktop', 'mennos-rtlsdr-pc'] + when: inventory_hostname in ['mennos-vps', 'mennos-server', 'mennos-rtlsdr-pc'] diff --git a/ansible/tasks/global/utils/smart-ssh/config.yaml b/ansible/tasks/global/utils/smart-ssh/config.yaml index 5cf26e9..16635c7 100644 --- a/ansible/tasks/global/utils/smart-ssh/config.yaml +++ b/ansible/tasks/global/utils/smart-ssh/config.yaml @@ -13,6 +13,12 @@ smart_aliases: desktop: primary: "desktop-local" fallback: "desktop" + check_host: "192.168.1.250" + timeout: "2s" + + server: + primary: "server-local" + fallback: "server" check_host: "192.168.1.254" timeout: "2s" diff --git a/ansible/tasks/servers/dynamic-dns.yml b/ansible/tasks/servers/dynamic-dns.yml index 8675d75..4b721cb 100644 --- a/ansible/tasks/servers/dynamic-dns.yml +++ b/ansible/tasks/servers/dynamic-dns.yml @@ -83,6 +83,6 @@ - Manual run: sudo /usr/local/bin/dynamic-dns-update.sh - Domains: vleeuwen.me, mvl.sh, mennovanleeuwen.nl - when: inventory_hostname == 'mennos-desktop' or inventory_hostname == 'mennos-vps' + when: inventory_hostname == 'mennos-server' or inventory_hostname == 'mennos-vps' tags: - dynamic-dns diff --git a/ansible/tasks/servers/juicefs.yml b/ansible/tasks/servers/juicefs.yml index 2f02828..aa69230 100644 --- a/ansible/tasks/servers/juicefs.yml +++ b/ansible/tasks/servers/juicefs.yml @@ -70,7 +70,7 @@ - name: Include JuiceFS Redis tasks ansible.builtin.include_tasks: services/redis/redis.yml - when: inventory_hostname == 'mennos-desktop' + when: inventory_hostname == 'mennos-server' - name: Enable and start JuiceFS service ansible.builtin.systemd: diff --git a/ansible/tasks/servers/server.yml b/ansible/tasks/servers/server.yml index e7324b7..c1e1a5c 100644 --- a/ansible/tasks/servers/server.yml +++ b/ansible/tasks/servers/server.yml @@ -78,84 +78,84 @@ - name: dashy enabled: true hosts: - - mennos-desktop + - mennos-server - name: gitea enabled: true hosts: - - mennos-desktop + - mennos-server - name: factorio enabled: true hosts: - - mennos-desktop + - mennos-server - name: dozzle enabled: true hosts: - - mennos-desktop + - mennos-server - name: beszel enabled: true hosts: - - mennos-desktop + - mennos-server - name: caddy enabled: true hosts: - - mennos-desktop + - mennos-server - name: golink enabled: true hosts: - - mennos-desktop + - mennos-server - name: immich enabled: true hosts: - - mennos-desktop + - mennos-server - name: plex enabled: true hosts: - - mennos-desktop + - mennos-server - name: tautulli enabled: true hosts: - - mennos-desktop + - mennos-server - name: downloaders enabled: true hosts: - - mennos-desktop + - mennos-server - name: wireguard enabled: true hosts: - - mennos-desktop + - mennos-server - name: nextcloud enabled: true hosts: - - mennos-desktop + - mennos-server - name: cloudreve enabled: true hosts: - - mennos-desktop + - mennos-server - name: echoip enabled: true hosts: - - mennos-desktop + - mennos-server - name: arr-stack enabled: true hosts: - - mennos-desktop + - mennos-server - name: home-assistant enabled: true hosts: - - mennos-desktop + - mennos-server - name: privatebin enabled: true hosts: - - mennos-desktop + - mennos-server - name: unifi-network-application enabled: true hosts: - - mennos-desktop + - mennos-server - name: avorion enabled: false hosts: - - mennos-desktop + - mennos-server - name: sathub enabled: true hosts: - - mennos-desktop + - mennos-server diff --git a/ansible/tasks/servers/services/caddy/Caddyfile.j2 b/ansible/tasks/servers/services/caddy/Caddyfile.j2 index 956515e..4eeed84 100644 --- a/ansible/tasks/servers/services/caddy/Caddyfile.j2 +++ b/ansible/tasks/servers/services/caddy/Caddyfile.j2 @@ -28,7 +28,7 @@ } {% endif %} -{% if inventory_hostname == 'mennos-desktop' %} +{% if inventory_hostname == 'mennos-server' %} git.mvl.sh { import country_block reverse_proxy gitea:3000 diff --git a/ansible/tasks/servers/services/dashy/conf.yml.j2 b/ansible/tasks/servers/services/dashy/conf.yml.j2 index 8257c58..c4c9bc2 100644 --- a/ansible/tasks/servers/services/dashy/conf.yml.j2 +++ b/ansible/tasks/servers/services/dashy/conf.yml.j2 @@ -5,34 +5,34 @@ sections: - name: Selfhosted items: - title: Plex - icon: http://mennos-desktop:4000/assets/plex.svg + icon: http://mennos-server:4000/assets/plex.svg url: https://plex.mvl.sh statusCheckUrl: https://plex.mvl.sh/identity statusCheck: true id: 0_1035_plex - title: Tautulli - icon: http://mennos-desktop:4000/assets/tautulli.svg + icon: http://mennos-server:4000/assets/tautulli.svg url: https://tautulli.mvl.sh id: 1_1035_tautulli statusCheck: true - title: Overseerr - icon: http://mennos-desktop:4000/assets/overseerr.svg + icon: http://mennos-server:4000/assets/overseerr.svg url: https://overseerr.mvl.sh id: 2_1035_overseerr statusCheck: true - title: Immich - icon: http://mennos-desktop:4000/assets/immich.svg + icon: http://mennos-server:4000/assets/immich.svg url: https://photos.mvl.sh id: 3_1035_immich statusCheck: true - title: Nextcloud - icon: http://mennos-desktop:4000/assets/nextcloud.svg + icon: http://mennos-server:4000/assets/nextcloud.svg url: https://drive.mvl.sh id: 3_1035_nxtcld statusCheck: true - title: ComfyUI - icon: http://mennos-desktop:8188/assets/favicon.ico - url: http://mennos-desktop:8188 + icon: http://mennos-server:8188/assets/favicon.ico + url: http://mennos-server:8188 statusCheckUrl: http://host.docker.internal:8188/api/system_stats id: 3_1035_comfyui statusCheck: true @@ -45,19 +45,19 @@ sections: - name: Media Management items: - title: Sonarr - icon: http://mennos-desktop:4000/assets/sonarr.svg + icon: http://mennos-server:4000/assets/sonarr.svg url: http://go/sonarr id: 0_1533_sonarr - title: Radarr - icon: http://mennos-desktop:4000/assets/radarr.svg + icon: http://mennos-server:4000/assets/radarr.svg url: http://go/radarr id: 1_1533_radarr - title: Prowlarr - icon: http://mennos-desktop:4000/assets/prowlarr.svg + icon: http://mennos-server:4000/assets/prowlarr.svg url: http://go/prowlarr id: 2_1533_prowlarr - title: Tdarr - icon: http://mennos-desktop:4000/assets/tdarr.png + icon: http://mennos-server:4000/assets/tdarr.png url: http://go/tdarr id: 3_1533_tdarr - name: Kagi @@ -77,7 +77,7 @@ sections: - name: News items: - title: Nu.nl - icon: http://mennos-desktop:4000/assets/nunl.svg + icon: http://mennos-server:4000/assets/nunl.svg url: https://www.nu.nl/ id: 0_380_nu - title: Tweakers.net @@ -91,7 +91,7 @@ sections: - name: Downloaders items: - title: qBittorrent - icon: http://mennos-desktop:4000/assets/qbittorrent.svg + icon: http://mennos-server:4000/assets/qbittorrent.svg url: http://go/qbit id: 0_1154_qbittorrent tags: @@ -99,7 +99,7 @@ sections: - torrent - yarr - title: Sabnzbd - icon: http://mennos-desktop:4000/assets/sabnzbd.svg + icon: http://mennos-server:4000/assets/sabnzbd.svg url: http://go/sabnzbd id: 1_1154_sabnzbd tags: @@ -109,7 +109,7 @@ sections: - name: Git items: - title: GitHub - icon: http://mennos-desktop:4000/assets/github.svg + icon: http://mennos-server:4000/assets/github.svg url: https://github.com/vleeuwenmenno id: 0_292_github tags: @@ -117,7 +117,7 @@ sections: - git - hub - title: Gitea - icon: http://mennos-desktop:4000/assets/gitea.svg + icon: http://mennos-server:4000/assets/gitea.svg url: http://git.mvl.sh/vleeuwenmenno id: 1_292_gitea tags: @@ -127,14 +127,14 @@ sections: - name: Server Monitoring items: - title: Beszel - icon: http://mennos-desktop:4000/assets/beszel.svg + icon: http://mennos-server:4000/assets/beszel.svg url: http://go/beszel tags: - monitoring - logs id: 0_1725_beszel - title: Dozzle - icon: http://mennos-desktop:4000/assets/dozzle.svg + icon: http://mennos-server:4000/assets/dozzle.svg url: http://go/dozzle id: 1_1725_dozzle tags: @@ -150,19 +150,19 @@ sections: - name: Tools items: - title: Home Assistant - icon: http://mennos-desktop:4000/assets/home-assistant.svg + icon: http://mennos-server:4000/assets/home-assistant.svg url: http://go/homeassistant id: 0_529_homeassistant - title: Tailscale - icon: http://mennos-desktop:4000/assets/tailscale.svg + icon: http://mennos-server:4000/assets/tailscale.svg url: http://go/tailscale id: 1_529_tailscale - title: GliNet KVM - icon: http://mennos-desktop:4000/assets/glinet.svg + icon: http://mennos-server:4000/assets/glinet.svg url: http://go/glkvm id: 2_529_glinetkvm - title: Unifi Network Controller - icon: http://mennos-desktop:4000/assets/unifi.svg + icon: http://mennos-server:4000/assets/unifi.svg url: http://go/unifi id: 3_529_unifinetworkcontroller - title: Dashboard Icons @@ -236,7 +236,7 @@ sections: - discount - work - title: Proxmox - icon: http://mennos-desktop:4000/assets/proxmox.svg + icon: http://mennos-server:4000/assets/proxmox.svg url: https://www.transip.nl/cp/vps/prm/350680/ id: 5_1429_proxmox tags: @@ -252,7 +252,7 @@ sections: - discount - work - title: Kibana - icon: http://mennos-desktop:4000/assets/kibana.svg + icon: http://mennos-server:4000/assets/kibana.svg url: http://go/kibana id: 7_1429_kibana tags: diff --git a/ansible/tasks/servers/services/sathub/docker-compose.yml.j2 b/ansible/tasks/servers/services/sathub/docker-compose.yml.j2 index b88d4d7..86191dd 100644 --- a/ansible/tasks/servers/services/sathub/docker-compose.yml.j2 +++ b/ansible/tasks/servers/services/sathub/docker-compose.yml.j2 @@ -66,7 +66,7 @@ services: - sathub - caddy_network depends_on: - migration: + migrate: condition: service_completed_successfully worker: @@ -101,7 +101,7 @@ services: networks: - sathub depends_on: - migration: + migrate: condition: service_completed_successfully postgres: @@ -154,7 +154,7 @@ services: - WATCHTOWER_INCLUDE_STOPPED=false - REPO_USER=${REPO_USER} - REPO_PASS=${REPO_PASS} - command: --interval 30 --cleanup --include-stopped=false sathub-backend sathub-worker sathub-frontend sathub-migrate + command: --interval 30 --cleanup --include-stopped=false sathub-backend sathub-worker sathub-frontend networks: - sathub diff --git a/ansible/templates/juicefs.service.j2 b/ansible/templates/juicefs.service.j2 index 408ddc3..fab00a9 100644 --- a/ansible/templates/juicefs.service.j2 +++ b/ansible/templates/juicefs.service.j2 @@ -5,7 +5,7 @@ Before=docker.service [Service] Type=simple -ExecStart=/usr/local/bin/juicefs mount redis://:{{ redis_password }}@mennos-desktop:6379/0 /mnt/object_storage \ +ExecStart=/usr/local/bin/juicefs mount redis://:{{ redis_password }}@mennos-server:6379/0 /mnt/object_storage \ --cache-dir=/var/jfsCache \ --buffer-size=4096 \ --prefetch=16 \ diff --git a/config/autostart/Nextcloud.desktop b/config/autostart/Nextcloud.desktop new file mode 100644 index 0000000..219765f --- /dev/null +++ b/config/autostart/Nextcloud.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=Nextcloud +GenericName=File Synchronizer +Exec="/usr/bin/nextcloud" --background +Terminal=false +Icon=Nextcloud +Categories=Network +Type=Application +StartupNotify=false +X-GNOME-Autostart-enabled=true +X-GNOME-Autostart-Delay=10 diff --git a/config/autostart/equibop.desktop b/config/autostart/equibop.desktop new file mode 100644 index 0000000..05e07e2 --- /dev/null +++ b/config/autostart/equibop.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=Equibop +Comment=Equibop autostart script +Exec="/opt/Equibop/equibop" +StartupNotify=false +Terminal=false +Icon=vesktop \ No newline at end of file diff --git a/config/git.nix b/config/git.nix index 46676e9..47a9467 100644 --- a/config/git.nix +++ b/config/git.nix @@ -23,7 +23,7 @@ }; core = { - editor = "zed"; + editor = "micro"; autocrlf = false; filemode = true; ignorecase = false; diff --git a/config/nextcloud.cfg b/config/nextcloud.cfg new file mode 100644 index 0000000..53f0f0e --- /dev/null +++ b/config/nextcloud.cfg @@ -0,0 +1,8 @@ +[General] +clientVersion=3.16.0-1 (Debian built) +isVfsEnabled=false +launchOnSystemStartup=true +promptDeleteAllFiles=false + +[Accounts] +version=13 diff --git a/flake.lock b/flake.lock index 8f681e3..651abac 100644 --- a/flake.lock +++ b/flake.lock @@ -41,11 +41,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1759735786, - "narHash": "sha256-a0+h02lyP2KwSNrZz4wLJTu9ikujNsTWIC874Bv7IJ0=", + "lastModified": 1759994382, + "narHash": "sha256-wSK+3UkalDZRVHGCRikZ//CyZUJWDJkBDTQX1+G77Ow=", "owner": "nixos", "repo": "nixpkgs", - "rev": "20c4598c84a671783f741e02bf05cbfaf4907cff", + "rev": "5da4a26309e796daa7ffca72df93dbe53b8164c7", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 2876336..f8b0671 100644 --- a/flake.nix +++ b/flake.nix @@ -42,6 +42,7 @@ { "mennos-vps" = mkHomeConfig "aarch64-linux" "mennos-vps" true; "mennos-desktop" = mkHomeConfig "x86_64-linux" "mennos-desktop" false; + "mennos-server" = mkHomeConfig "x86_64-linux" "mennos-server" true; "mennos-rtlsdr-pc" = mkHomeConfig "x86_64-linux" "mennos-rtlsdr-pc" true; "mennos-laptop" = mkHomeConfig "x86_64-linux" "mennos-laptop" false; };