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/modules/programs | |
parent | 2f7f9e4ae3bead5b6a2b9939298c518b463fb61f (diff) | |
parent | 35de6f1c4eb4e983fe39a5407db7c831fea675f7 (diff) | |
download | nixlib-7953a7864187f7e70dad957719f5039e261e20a7.tar nixlib-7953a7864187f7e70dad957719f5039e261e20a7.tar.gz nixlib-7953a7864187f7e70dad957719f5039e261e20a7.tar.bz2 nixlib-7953a7864187f7e70dad957719f5039e261e20a7.tar.lz nixlib-7953a7864187f7e70dad957719f5039e261e20a7.tar.xz nixlib-7953a7864187f7e70dad957719f5039e261e20a7.tar.zst nixlib-7953a7864187f7e70dad957719f5039e261e20a7.zip |
Merge pull request #280076 from SomeoneSerge/fix/apptainer-nv-cherry
apptainer: unbreak --nv (userns+nvliblist.conf variant)
Diffstat (limited to 'nixos/modules/programs')
-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 9fd37e1793a7..7f285ab05537 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. |