Add Samba for edge-cases

This commit is contained in:
Jimbo 2024-09-11 00:59:16 -04:00
parent 0cf8dd8e69
commit b83827eafd
4 changed files with 43 additions and 3 deletions

View file

@ -27,8 +27,6 @@
./server/gitea.nix
./server/mailserver.nix
./server/mariadb.nix
./server/nextcloud.nix
./server/nfs.nix
./server/nginx.nix
./server/owncast.nix
./server/photoprism.nix
@ -38,6 +36,11 @@
./server/wireguard.nix
./server/misc.nix
# File server
./server/nextcloud.nix
./server/nfs.nix
./server/samba.nix
# Matrix
./server/synapse.nix
./server/element.nix

View file

@ -8,7 +8,7 @@
https = true;
config = {
adminuser = "jimbo";
adminpassFile = "${pkgs.writeText "nextpass" outputs.secrets.nextcloudPass}";
adminpassFile = "/mnt/nextcloud/password.txt";
};
settings = {
trusted_proxies = [ "127.0.0.1" ];

37
nixos/server/samba.nix Normal file
View file

@ -0,0 +1,37 @@
{
services = {
samba = {
enable = true;
securityType = "user";
openFirewall = true;
extraConfig = let
ips = import ../modules/ips.nix;
in ''
workgroup = WORKGROUP
server string = JimSMB
security = user
hosts allow = ${ips.localSpan}. 127.0.0.1 localhost
hosts deny = 0.0.0.0/0
guest account = nobody
map to guest = bad user
'';
shares = {
roms = {
comment = "Samba share with my ROMs";
path = "/export/JimboNFS/Downloads/GameFiles/ROMS";
browseable = "yes";
"read only" = "no";
"guest ok" = "no";
"create mask" = "0644";
"directory mask" = "0755";
};
};
};
# Advertise to Windows
samba-wsdd = {
enable = true;
openFirewall = true;
};
};
}

Binary file not shown.