Merge pull request #302645 from anthonyroussel/fix-samba

This commit is contained in:
Sandro 2024-06-20 13:48:06 +02:00 committed by GitHub
commit 3d37622cff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -201,14 +201,10 @@ in
message = "If samba.nsswins is enabled, then samba.enableWinbindd must also be enabled";
}
];
# Always provide a smb.conf to shut up programs like smbclient and smbspool.
environment.etc."samba/smb.conf".source = mkOptionDefault (
if cfg.enable then configFile
else pkgs.writeText "smb-dummy.conf" "# Samba is disabled."
);
}
(mkIf cfg.enable {
environment.etc."samba/smb.conf".source = configFile;
system.nssModules = optional cfg.nsswins samba;
system.nssDatabases.hosts = optional cfg.nsswins "wins";