I use the nix package manager to install new packages on an old Arch Linux installation that has not been upgraded in a long time. The package manager runs beautifully and even allowed me to install flatpak on this old system. The only problem is that flatpak applications only run with sudo:
$ which flatpak
/home/bruno/.nix-profile/bin/flatpak
$ flatpak run org.gnome.Recipes
bwrap: Creating new namespace failed, likely because the kernel does not support user namespaces. bwrap must be installed setuid on such systems.
error: ldconfig failed, exit status 256
$ sudo flatpak run org.gnome.Recipes # this works
I tried making bwrap suid as suggested by the error message, but still no joy:
$ sudo chown -R bruno:root /nix/store/q67sv4bhq6snp4r6cbh79s9zknvqg78h-bubblewrap-0.3.0
$ sudo chmod -R u+s /nix/store/q67sv4bhq6snp4r6cbh79s9zknvqg78h-bubblewrap-0.3.0
$ flatpak run org.gnome.Recipes
bwrap: Creating new namespace failed, likely because the kernel does not support user namespaces. bwrap must be installed setuid on such systems.
error: ldconfig failed, exit status 256
$ sudo flatpak run org.gnome.Recipes # this works
Does anybody know how to make “flatpak run” work without sudo in a nix environment? This machine has kernel 4.1.6 and I will upgrade it just in case it is the problem.