From d47de274230bf4b13e268b070e294af6d7523d01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Fri, 2 Jan 2026 06:32:22 +0100 Subject: [PATCH] wallabag: run on podman, autoupdate --- systems/ful/wallabag.nix | 37 ++++++++++++++++++++++++++++++- systems/zaatar/home-assistant.nix | 2 +- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/systems/ful/wallabag.nix b/systems/ful/wallabag.nix index 190b3f8..94fd1bc 100644 --- a/systems/ful/wallabag.nix +++ b/systems/ful/wallabag.nix @@ -25,9 +25,44 @@ in services.restic.backups.niveum.paths = [ dataPath ]; + systemd.services.update-containers = { + startAt = "Mon 02:00"; + script = '' + images=$(${pkgs.podman}/bin/podman ps -a --format="{{.Image}}" | sort -u) + + for image in $images; do + ${pkgs.podman}/bin/podman pull "$image" + done + ''; + serviceConfig = { + Type = "oneshot"; + Restart = "on-failure"; + RestartSec = "1h"; + }; + }; + + systemd.services.restart-wallabag = { + startAt = "Tue 02:00"; + script = '' + ${pkgs.systemd}/bin/systemctl try-restart podman-${domain}.service + ''; + serviceConfig = { + Type = "oneshot"; + }; + }; + + virtualisation.podman = { + enable = true; + autoPrune = { + enable = true; + flags = [ "--all" ]; + }; + }; + + virtualisation.oci-containers.backend = "podman"; virtualisation.oci-containers.containers."${domain}" = { autoStart = true; - image = "wallabag/wallabag:2.6.12"; + image = "wallabag/wallabag:latest"; ports = [ "${port}:80" ]; volumes = [ "${dataPath}/data:/var/www/wallabag/data" diff --git a/systems/zaatar/home-assistant.nix b/systems/zaatar/home-assistant.nix index 8390a0c..fd22de6 100644 --- a/systems/zaatar/home-assistant.nix +++ b/systems/zaatar/home-assistant.nix @@ -84,7 +84,7 @@ in image = "ghcr.io/home-assistant/home-assistant:stable"; extraOptions = [ "--network=host" - "--device=/dev/ttyACM0:/dev/ttyACM0" # Example, change this to match your own hardware + "--device=/dev/ttyACM0:/dev/ttyACM0" ]; }; };