Add services.samba.nsswins option
This option allows for seamless WINS/NetBIOS name lookup, using nsswitch.
This commit is contained in:
parent
40342e975d
commit
8a01d244b1
@ -7,6 +7,7 @@ with pkgs.lib;
|
|||||||
let
|
let
|
||||||
|
|
||||||
inherit (config.services.avahi) nssmdns;
|
inherit (config.services.avahi) nssmdns;
|
||||||
|
inherit (config.services.samba) nsswins;
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -43,7 +44,7 @@ in
|
|||||||
passwd: files ldap
|
passwd: files ldap
|
||||||
group: files ldap
|
group: files ldap
|
||||||
shadow: files ldap
|
shadow: files ldap
|
||||||
hosts: files ${optionalString nssmdns "mdns_minimal [NOTFOUND=return]"} dns ${optionalString nssmdns "mdns"} myhostname
|
hosts: files ${optionalString nssmdns "mdns_minimal [NOTFOUND=return]"} dns ${optionalString nssmdns "mdns"} ${optionalString nsswins "wins"} myhostname
|
||||||
networks: files dns
|
networks: files dns
|
||||||
ethers: files
|
ethers: files
|
||||||
services: files
|
services: files
|
||||||
|
@ -170,6 +170,16 @@ in
|
|||||||
example = "share";
|
example = "share";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nsswins = mkOption {
|
||||||
|
default = false;
|
||||||
|
type = types.uniq types.bool;
|
||||||
|
description = ''
|
||||||
|
Whether to enable the WINS NSS (Name Service Switch) plug-in.
|
||||||
|
Enabling it allows applications to resolve WINS/NetBIOS names (a.k.a.
|
||||||
|
Windows machine names) by transparently querying the winbindd daemon.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
@ -196,6 +206,8 @@ in
|
|||||||
|
|
||||||
users.extraGroups.smbguest.gid = config.ids.uids.smbguest;
|
users.extraGroups.smbguest.gid = config.ids.uids.smbguest;
|
||||||
|
|
||||||
|
system.nssModules = optional cfg.nsswins samba;
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
targets.samba = {
|
targets.samba = {
|
||||||
description = "Samba server";
|
description = "Samba server";
|
||||||
|
Loading…
Reference in New Issue
Block a user