{ lib, config, ... }: with lib; let cfg = config.nas-apps.orca-slicer; in { imports = [ ./options.nix ]; config = mkIf cfg.enable { virtualisation.oci-containers.containers."${cfg.name}" = { autoStart = cfg.autoStart; image = cfg.image; extraOptions = [ "--device=nvidia.com/gpu=0" ]; ports = [ "${cfg.httpPort}:3000" "${cfg.httpsPort}:3001" ]; volumes = [ "${cfg.configPath}:/config" "${cfg.dataPath}:/data" ]; environment = { PUID = cfg.puid; PGID = cfg.pgid; TZ = cfg.timeZone; TITLE = "orca-slicer"; DRINODE = "/dev/dri/renderD128"; NO_DECOR = "1"; }; }; }; }