Created
November 16, 2019 04:51
-
-
Save maxdevjs/bcc6d64f31d9598495ec58103e679b9f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
environment.systemPackages = with pkgs; | |
[ | |
kdeApplications.kdenetwork-filesharing | |
]; | |
services.samba = { | |
enable = true; | |
package = pkgs.sambaFull; | |
securityType = "user"; | |
extraConfig = '' | |
workgroup = WORKGROUP | |
server string = smbnix | |
netbios name = smbnix | |
security = user | |
#use sendfile = yes | |
#max protocol = smb2 | |
hosts allow = 192.168.0 localhost | |
hosts deny = 0.0.0.0/0 | |
guest account = nobody | |
map to guest = bad user | |
''; | |
shares = { | |
public = { | |
path = "/home/max/Public"; | |
browseable = "yes"; | |
"read only" = "no"; | |
"guest ok" = "yes"; | |
"create mask" = "0644"; | |
"directory mask" = "0755"; | |
"force user" = "username"; | |
"force group" = "groupname"; | |
}; | |
private = { | |
path = "/home/max/Desktop"; | |
browseable = "yes"; | |
"read only" = "no"; | |
"guest ok" = "no"; | |
"create mask" = "0644"; | |
"directory mask" = "0755"; | |
"force user" = "username"; | |
"force group" = "groupname"; | |
}; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment