Last active
November 9, 2024 20:25
-
-
Save mbrgm/08f2e8e3a5d3c785c569e075d3649b06 to your computer and use it in GitHub Desktop.
Non-root-NFS-enabled GVFS on NixOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { lib | |
| , pkgs | |
| , ... }: | |
| let | |
| package = pkgs.gnome.gvfs; | |
| in { | |
| security.wrappers.gvfsd-nfs = { | |
| source = "${package}/libexec/gvfsd-nfs"; | |
| owner = "nobody"; | |
| group = "nogroup"; | |
| capabilities = "cap_net_bind_service+ep"; | |
| }; | |
| services.gvfs = { | |
| enable = true; | |
| package = lib.mkForce (package.overrideAttrs (oldAttrs: { | |
| postInstall = '' | |
| ln -sf /run/wrappers/bin/gvfsd-nfs $out/libexec/gvfsd-nfs | |
| ''; | |
| })); | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment