{ lib, pkgs, config, ... }: with lib; let cfg = config.nas-apps.collabora; in { imports = [ ./options.nix ]; config = mkIf cfg.enable { virtualisation.oci-containers.containers."${cfg.name}" = { autoStart = cfg.autoStart; image = cfg.image; ports = [ "${cfg.port}:9980" ]; volumes = [ # ... ]; environment = { PUID = cfg.puid; PGID = cfg.pgid; TZ = cfg.timeZone; username = cfg.username; password = cfg.password; domain = "office.mjallen.dev"; aliasgroup1 = "https://cloud\.mjallen\.dev:443"; aliasgroup2 = "https://cloud\.mjallen\.dev:443"; # DONT_GEN_SSL_CERT = cfg.dontGenSslCert; server_name = cfg.serverName; dictionaries = cfg.dictionaries; extra_params = cfg.extraParams; }; }; }; }