feat: Enhance NAS Samba share configuration with user allowance
This commit is contained in:
parent
c9e0431acf
commit
87cd7000a1
2 changed files with 14 additions and 2 deletions
|
|
@ -11,13 +11,22 @@ in
|
|||
{
|
||||
options.my.networking.nas-samba-share = {
|
||||
enable = mkEnableOption "Enable Samba connection with NAS";
|
||||
|
||||
allowUsers = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
List of users that are allowed to connect to the NAS.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
users.groups."lxc_shares" = {
|
||||
gid = 10000;
|
||||
members = [ config.users.users.pazpi.name ];
|
||||
members = [ config.users.users.pazpi.name ] ++ cfg.allowUsers;
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue