mirror of
https://github.com/FabricSoul/nixos-configs.git
synced 2025-08-04 09:00:23 -04:00
38 lines
961 B
Nix
38 lines
961 B
Nix
# hosts/common/optional/nfs.nix
|
|
{...}: {
|
|
services.samba = {
|
|
enable = true;
|
|
securityType = "user";
|
|
openFirewall = true;
|
|
settings = {
|
|
global = {
|
|
"workgroup" = "WORKGROUP";
|
|
"server string" = "smbnix";
|
|
"netbios name" = "smbnix";
|
|
"security" = "user";
|
|
#"use sendfile" = "yes";
|
|
#"max protocol" = "smb2";
|
|
# note: localhost is the ipv6 localhost ::1
|
|
"hosts allow" = "192.168.2. 127.0.0.1 100. localhost";
|
|
"hosts deny" = "0.0.0.0/0";
|
|
"guest account" = "nobody";
|
|
"map to guest" = "bad user";
|
|
};
|
|
"public" = {
|
|
"path" = "/nas";
|
|
"browseable" = "yes";
|
|
"read only" = "no";
|
|
"guest ok" = "yes";
|
|
"create mask" = "0644";
|
|
"directory mask" = "0755";
|
|
"force user" = "root";
|
|
"force group" = "root";
|
|
};
|
|
};
|
|
};
|
|
|
|
services.samba-wsdd = {
|
|
enable = true;
|
|
openFirewall = true;
|
|
};
|
|
}
|