{ lib, config, pkgs, ... }: with lib; let cfg = config.my.networking.lxc_shares; in { options.my.networking.lxc_shares = { 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 ] ++ cfg.allowUsers; }; }; }