s 1 wolf: share directory
This commit is contained in:
parent
679a03403f
commit
8eb9bde68a
|
@ -15,6 +15,7 @@ in
|
|||
../2configs/cgit-mirror.nix
|
||||
../2configs/repo-sync.nix
|
||||
../2configs/graphite.nix
|
||||
../2configs/share-shack.nix
|
||||
];
|
||||
# use your own binary cache, fallback use cache.nixos.org (which is used by
|
||||
# apt-cacher-ng in first place)
|
||||
|
|
38
shared/2configs/share-shack.nix
Normal file
38
shared/2configs/share-shack.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{config, ... }:{
|
||||
users.users.smbguest = {
|
||||
name = "smbguest";
|
||||
uid = config.ids.uids.smbguest;
|
||||
group = "share";
|
||||
description = "smb guest user";
|
||||
home = "/home/share";
|
||||
createHome = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
139 445 # samba
|
||||
];
|
||||
|
||||
networking.firewall.allowedUDPPorts = [
|
||||
137 138
|
||||
];
|
||||
services.samba = {
|
||||
enable = true;
|
||||
shares = {
|
||||
share-home = {
|
||||
path = "/home/share/";
|
||||
"read only" = "no";
|
||||
browseable = "yes";
|
||||
"guest ok" = "yes";
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
guest account = smbguest
|
||||
map to guest = bad user
|
||||
# disable printing
|
||||
load printers = no
|
||||
printing = bsd
|
||||
printcap name = /dev/null
|
||||
disable spoolss = yes
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue