add nvidia runtime

This commit is contained in:
Joseph Hanson 2024-11-21 17:44:51 -06:00
parent 88f7106962
commit 46c4752395
Signed by: jahanson
SSH key fingerprint: SHA256:vy6dKBECV522aPAwklFM3ReKAVB086rT3oWwiuiFG7o
2 changed files with 8 additions and 1 deletions

View file

@ -31,17 +31,24 @@ in
virtualisation.oci-containers.containers.${app} = { virtualisation.oci-containers.containers.${app} = {
image = "${image}"; image = "${image}";
user = "568:568"; user = "568:568";
volumes = [ volumes = [
"/nahar/containers/volumes/plex:/config/Library/Application Support/Plex Media Server:rw" "/nahar/containers/volumes/plex:/config/Library/Application Support/Plex Media Server:rw"
"/moria/media:/media:rw" "/moria/media:/media:rw"
"tmpfs:/config/Library/Application Support/Plex Media Server/Logs:rw" "tmpfs:/config/Library/Application Support/Plex Media Server/Logs:rw"
"tmpfs:/tmp:rw" "tmpfs:/tmp:rw"
]; ];
extraOptions = [
"--runtime=nvidia"
];
environment = { environment = {
TZ = "America/Chicago"; TZ = "America/Chicago";
# PLEX_ADVERTISE_URL = "https://${app}.hsn.dev"; # PLEX_ADVERTISE_URL = "https://${app}.hsn.dev";
PLEX_NO_AUTH_NETWORKS = "10.1.1.0/24,10.1.2.0/24"; PLEX_NO_AUTH_NETWORKS = "10.1.1.0/24,10.1.2.0/24";
}; };
ports = [ "${toString port}:${toString port}" ]; # expose port ports = [ "${toString port}:${toString port}" ]; # expose port
}; };

View file

@ -43,7 +43,7 @@ in
# all usb devices, such as coral tpu # all usb devices, such as coral tpu
"--device=/dev/bus/usb" "--device=/dev/bus/usb"
"--network=host" "--network=host"
# "--runtime=nvidia" "--runtime=nvidia"
]; ];
environment = { environment = {