{ config, lib, ... }: let cfg = config.services.az-heimdall; volumePath = "/mnt/server-data/heimdall"; in { options = { services.az-heimdall.enable = lib.mkEnableOption "Enable Heimdall"; }; config = lib.mkIf cfg.enable { services.az-docker.enable = true; fileSystems."${volumePath}" = { device = "10.7.89.108:server_data/heimdall"; fsType = "nfs"; options = [ "hard" "noatime" "rw" ]; }; virtualisation.oci-containers = { backend = "docker"; containers."heimdall" = { # https://fleet.linuxserver.io/image?name=linuxserver/heimdall image = "linuxserver/heimdall:2.6.1@sha256:ca23336905e8134a5da0448b1e69cb70aef27df229d3097e5d3be2f35f13d633"; autoStart = true; environment = { TZ = "Europe/Zurich"; PUID = "1000"; PGID = "100"; }; ports = [ "8081:80" ]; volumes = [ "/etc/localtime:/etc/localtime:ro" "${volumePath}:/config" ]; extraOptions = [ "--log-opt=tag='heimdall'" ]; }; }; }; }