mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 00:49:42 +08:00
enable samba
This commit is contained in:
@@ -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
|
||||
|
||||
53
modules/networking/samba.nix
Normal file
53
modules/networking/samba.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user