From 46c4752395493fabf84206f0554efaa1aa977f3d Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Thu, 21 Nov 2024 17:44:51 -0600 Subject: [PATCH] add nvidia runtime --- nixos/modules/nixos/containers/plex/default.nix | 7 +++++++ nixos/modules/nixos/containers/scrypted/default.nix | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nixos/modules/nixos/containers/plex/default.nix b/nixos/modules/nixos/containers/plex/default.nix index 4b6b7f7..f15b9c3 100644 --- a/nixos/modules/nixos/containers/plex/default.nix +++ b/nixos/modules/nixos/containers/plex/default.nix @@ -31,17 +31,24 @@ in virtualisation.oci-containers.containers.${app} = { image = "${image}"; user = "568:568"; + volumes = [ "/nahar/containers/volumes/plex:/config/Library/Application Support/Plex Media Server:rw" "/moria/media:/media:rw" "tmpfs:/config/Library/Application Support/Plex Media Server/Logs:rw" "tmpfs:/tmp:rw" ]; + + extraOptions = [ + "--runtime=nvidia" + ]; + environment = { TZ = "America/Chicago"; # PLEX_ADVERTISE_URL = "https://${app}.hsn.dev"; PLEX_NO_AUTH_NETWORKS = "10.1.1.0/24,10.1.2.0/24"; }; + ports = [ "${toString port}:${toString port}" ]; # expose port }; diff --git a/nixos/modules/nixos/containers/scrypted/default.nix b/nixos/modules/nixos/containers/scrypted/default.nix index e86911a..11fd385 100644 --- a/nixos/modules/nixos/containers/scrypted/default.nix +++ b/nixos/modules/nixos/containers/scrypted/default.nix @@ -43,7 +43,7 @@ in # all usb devices, such as coral tpu "--device=/dev/bus/usb" "--network=host" - # "--runtime=nvidia" + "--runtime=nvidia" ]; environment = {