From 8453cc92b6f823b7f1b1f4ea91b46e6641a7fdcf Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 31 Dec 2024 03:47:54 -0700 Subject: [PATCH] [NixOS] Temporarily remove create-symlinks hooks --- nixos/flake.lock | 6 +++--- nixos/nvidia.nix | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/nixos/flake.lock b/nixos/flake.lock index 5f8e9649..6d6ac302 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -1406,11 +1406,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1735602766, - "narHash": "sha256-fu6LqEoR7WsINjGQHdhi1es/zkucJfZi5xMmR/fBvsw=", + "lastModified": 1735641514, + "narHash": "sha256-63DDVPlpdQf6iheoVGBbD+1T9nTGPtY73sCXTDkwhIQ=", "owner": "colonelpanic8", "repo": "nixpkgs", - "rev": "5d6958e7bcb72e7720d01843e8778f640cffc113", + "rev": "731d09a7f6fbca541482925bb28c3892600f67e7", "type": "github" }, "original": { diff --git a/nixos/nvidia.nix b/nixos/nvidia.nix index bc916529..15153957 100644 --- a/nixos/nvidia.nix +++ b/nixos/nvidia.nix @@ -1,12 +1,18 @@ -{ config, pkgs, makeEnable, ... }: +{ config, pkgs, makeEnable, lib, ... }: makeEnable config "myModules.nvidia" false { environment.systemPackages = with pkgs; [ nvidia-container-toolkit + nvidia-container-toolkit.tools ]; hardware.nvidia-container-toolkit = { enable = true; mount-nvidia-executables = true; + additionalEdit = '' + ${lib.getExe pkgs.jq} ' + .devices |= map( + .containerEdits.hooks |= map(select(.args | index("create-symlinks") < 0)) + )' | ${lib.getExe pkgs.jq} '.containerEdits.hooks |= map(select(.args | index("create-symlinks") < 0 ))' ''; }; hardware.nvidia.open = true; hardware.graphics.enable32Bit = true;