diff options
author | Someone <sergei.kozlukov@aalto.fi> | 2024-01-11 00:51:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-11 00:51:23 +0000 |
commit | 7953a7864187f7e70dad957719f5039e261e20a7 (patch) | |
tree | 6ae51c215d353cc5f313e6793b348d76a399b575 /nixos | |
parent | 2f7f9e4ae3bead5b6a2b9939298c518b463fb61f (diff) | |
parent | 35de6f1c4eb4e983fe39a5407db7c831fea675f7 (diff) |
Merge pull request #280076 from SomeoneSerge/fix/apptainer-nv-cherry
apptainer: unbreak --nv (userns+nvliblist.conf variant)
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/programs/singularity.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nixos/modules/programs/singularity.nix b/nixos/modules/programs/singularity.nix index 9fd37e1793a7f..7f285ab05537a 100644 --- a/nixos/modules/programs/singularity.nix +++ b/nixos/modules/programs/singularity.nix @@ -61,7 +61,12 @@ in }; enableSuid = mkOption { type = types.bool; - default = true; + # SingularityCE requires SETUID for most things. Apptainer prefers user + # namespaces, e.g. `apptainer exec --nv` would fail if built + # `--with-suid`: + # > `FATAL: nvidia-container-cli not allowed in setuid mode` + default = cfg.package.projectName != "apptainer"; + defaultText = literalExpression ''config.services.singularity.package.projectName != "apptainer"''; example = false; description = mdDoc '' Whether to enable the SUID support of Singularity/Apptainer. |