{ config, pkgs, ... }: { users.users.samba = { isSystemUser = true; description = "Samba User"; extraGroups = [ "samba" ]; }; services.samba = { enable = true; securityType = "user"; extraConfig = '' workgroup = WORKGROUP server string = PS2 Samba Server server role = standalone server max log size = 0 # Disable printers. load printers = no printing = bsd printcap name = /etc/printcap printcap cache time = 0 disable spoolss = yes pam password change = yes map to guest = bad user usershare allow guests = yes create mask = 0664 force create mode = 0664 directory mask = 0775 force directory mode = 0775 force user = force group = users # =========================== # PlayStations 2 OPL settings # =========================== # Lower the minimum protocol to NT1 (a SMB1 dialect), this is required since # Samba 4.11 changed the default and deprecated SMB1. # See https://github.com/ifcaro/Open-PS2-Loader/issues/86 and # https://github.com/ps2dev/ps2sdk/issues/72 for future SMB2 support. server min protocol = NT1 server signing = disabled smb encrypt = disabled socket options = TCP_NODELAY TCP_KEEPIDLE=20 IPTOS_LOWDELAY SO_KEEPALIVE # Disable keepalive to avoid hanging onto locks. Should not be needed # due to SO_KEEPALIVE and helps with FMV audio stutter. keepalive = 0 ''; shares = { PS2SMB = { "comment" = "PlaStation 2"; path = "/mnt/ps2"; browseable = "yes"; "read only" = "no"; "guest ok" = "yes"; "public" = "yes"; "available" = "yes"; }; }; }; }