enable samba

This commit is contained in:
2023-06-20 15:44:34 +08:00
parent 5cf5ecddad
commit bcd11a9cf6
2 changed files with 54 additions and 0 deletions

View File

@@ -116,6 +116,7 @@
./modules/hardware/sound.nix
./modules/hardware/chn-PC.nix
./modules/networking/basic.nix
./modules/networking/samba.nix
./modules/networking/ssh.nix
./modules/networking/wall_client.nix
./modules/networking/xmunet.nix

View File

@@ -0,0 +1,53 @@
{
config =
{
# make shares visible for windows 10 clients
services.samba-wsdd.enable = true;
# networking.firewall = { allowedTCPPorts = [ 5357 ]; allowedUDPPorts = [ 3702 ]; };
services.samba =
{
enable = true;
securityType = "user";
extraConfig =
''
workgroup = WORKGROUP
server string = Samba Server
server role = standalone server
hosts allow = 192.168. 127.
dns proxy = no
'';
shares =
{
media =
{
comment = "chn media";
path = "/run/media/chn";
browseable = true;
writeable = true;
};
home =
{
comment = "chn home";
path = "/home/chn";
browseable = true;
writeable = true;
};
mnt =
{
comment = "mnt";
path = "/mnt";
browseable = true;
writeable = true;
};
share =
{
comment = "chn share";
path = "/home/chn/share";
browseable = true;
writeable = true;
};
};
};
};
}