Skip to content

Commit

Permalink
Let containers be compatible with libnvidia-container
Browse files Browse the repository at this point in the history
Currently containers created by `devenv` will contain a symlink `/lib -> /nix/store/lf0wpjrj8yx4gsmw2s3xfl58ixmqk8qa-bash-5.2-p15/lib`. The symlink conflicts with `libnvidia-container` because `libnvidia-container` tries to create a file `/lib/firmware/nvidia/525.85.12/gsp_ad10x.bin` while it specifies `O_NOFOLLOW` according to https://github.com/NVIDIA/libnvidia-container/blob/1eb5a30a6ad0415550a9df632ac8832bf7e2bbba/src/utils.c#L523

This PR makes `/lib` a regular directory, while making files under `/lib` symlinks so that it would be compatible with `libnvidia-container`.
  • Loading branch information
Atry committed Nov 15, 2023
1 parent 14fdefc commit f139c76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/containers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ let
(if builtins.typeOf cfg.copyToRoot == "list"
then cfg.copyToRoot
else [ cfg.copyToRoot ]);
pathsToLink = "/";
pathsToLink = [ "/" "/lib" ];
})
];
config = {
Expand Down

0 comments on commit f139c76

Please sign in to comment.