Talk:Samba: Difference between revisions
Latest comment: 25 October by GrandPBB in topic services.samba.settings is available on unstable, it does not exist for nixos 24.05
imported>Freelancer42 Created page with "The "mount as user" section on this page suggests the following to pull the uid and gid from the configuration: <syntaxhighlight lang="nix"> ["${automount_opts},credentials=/..." |
|||
Line 20: | Line 20: | ||
--[[User:Freelancer42|Freelancer42]] ([[User talk:Freelancer42|talk]]) 15:10, 23 February 2024 (UTC) | --[[User:Freelancer42|Freelancer42]] ([[User talk:Freelancer42|talk]]) 15:10, 23 February 2024 (UTC) | ||
== services.samba.settings is available on unstable, it does not exist for nixos 24.05 == | |||
services.samba.settings is available on unstable, it does not exist for nixos 24.05 | |||
To use the configuration for 24.05, use [https://search.nixos.org/options?channel=24.05&show=services.samba.extraConfig&from=0&size=50&sort=relevance&type=packages&query=services.samba services.samba.extraConfig] [[User:GrandPBB|GrandPBB]] ([[User talk:GrandPBB|talk]]) 03:17, 25 October 2024 (UTC) |
Latest revision as of 03:17, 25 October 2024
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.
--Freelancer42 (talk) 15:10, 23 February 2024 (UTC)
services.samba.settings is available on unstable, it does not exist for nixos 24.05
services.samba.settings is available on unstable, it does not exist for nixos 24.05
To use the configuration for 24.05, use services.samba.extraConfig GrandPBB (talk) 03:17, 25 October 2024 (UTC)