Files
nix-config/modules/apps/orca-slicer/default.nix
mjallen18 c42e4f5a98 fix icons
2024-08-26 16:54:22 -05:00

33 lines
718 B
Nix

{ 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";
};
};
};
}