summary refs log tree commit diff stats
path: root/system/settings/services/samba.nix
blob: 729a6756bd5eae25451788d43446af8cb9595027 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
  config,
  pkgs,
  ...
}: let
  workgroup = "WORKGROUP";
in {
  services.samba-wsdd = {
    inherit workgroup;
    enable = true;
  };
  networking.firewall.allowedTCPPorts = [5357];
  networking.firewall.allowedUDPPorts = [3702];

  services.samba = {
    enable = true;
    openFirewall = true;
    securityType = "user";
    extraConfig = ''
      workgroup = ${workgroup}
      server string = ${config.networking.hostName}
      netbios name = ${config.networking.hostName}
      security = user
      #use sendfile = yes
      #max protocol = smb2
      guest account = nobody
      map to guest = bad user
    '';
  };
}