Talk:Samba
Latest comment: 23 February by Freelancer42
The "mount as user" section on this page suggests the following to pull the uid and gid from the configuration:
["${automount_opts},credentials=/etc/nixos/smb-secrets,${config.users.users.<username>.uid},gid=${config.users.groups.<group>.gid}"];
Two issues with this:
- It's missing "uid="
- The uid and gid attributes are integers, and nix refuses to coerce them to strings
It should probably read something like this (which is working for me):
["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=${toString config.users.users.<username>.uid},gid=${toString config.users.groups.<group>.gid}"];
I'm very new to NixOS though so I don't want to update the page in case I've missed something.