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
|
|
@ -13,7 +13,10 @@
|
||||||
proxy.domain = "tegola.pro";
|
proxy.domain = "tegola.pro";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.nas-samba-share.enable = true;
|
networking.nas-samba-share = {
|
||||||
|
enable = true;
|
||||||
|
allowUsers = [ "nextcloud" ];
|
||||||
|
};
|
||||||
|
|
||||||
virtualisation.proxmox.enable = true;
|
virtualisation.proxmox.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,13 +11,22 @@ in
|
||||||
{
|
{
|
||||||
options.my.networking.nas-samba-share = {
|
options.my.networking.nas-samba-share = {
|
||||||
enable = mkEnableOption "Enable Samba connection with NAS";
|
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 {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
users.groups."lxc_shares" = {
|
users.groups."lxc_shares" = {
|
||||||
gid = 10000;
|
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