1 { config, pkgs, lib, ... }:
5 cfg = config.programs.singularity;
6 singularity = pkgs.singularity.overrideAttrs (attrs : {
7 installPhase = attrs.installPhase + ''
8 mv $out/libexec/singularity/bin/starter-suid $out/libexec/singularity/bin/starter-suid.orig
9 ln -s /run/wrappers/bin/singularity-suid $out/libexec/singularity/bin/starter-suid
13 options.programs.singularity = {
14 enable = mkEnableOption (lib.mdDoc "Singularity");
17 config = mkIf cfg.enable {
18 environment.systemPackages = [ singularity ];
19 security.wrappers.singularity-suid =
23 source = "${singularity}/libexec/singularity/bin/starter-suid.orig";
25 systemd.tmpfiles.rules = [
26 "d /var/singularity/mnt/session 0770 root root -"
27 "d /var/singularity/mnt/final 0770 root root -"
28 "d /var/singularity/mnt/overlay 0770 root root -"
29 "d /var/singularity/mnt/container 0770 root root -"
30 "d /var/singularity/mnt/source 0770 root root -"