Add Samba for edge-cases
This commit is contained in:
parent
0cf8dd8e69
commit
b83827eafd
|
@ -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
|
||||
|
|
|
@ -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
37
nixos/server/samba.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
BIN
secrets.nix
BIN
secrets.nix
Binary file not shown.
Loading…
Reference in a new issue