all repos — nixfiles @ 05b74c90789261dad95f5fc860972d94920d4e6e

System and user configuration, managed by nix and home-manager

samba: broadcast a lowercase hostname over mdns
Alan Pearce alan@alanpearce.eu
Wed, 19 Apr 2023 15:53:15 +0200
commit

05b74c90789261dad95f5fc860972d94920d4e6e

parent

35d2774d1a867c97419740e7297ae00974108ff4

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M system/settings/services/samba.nixsystem/settings/services/samba.nix
@@ -15,12 +15,13 @@ networking.firewall.allowedUDPPorts = [ 3702 ]; 
   services.samba = {
     enable = true;
+    enableNmbd = false;
+    package = pkgs.samba.override { enableMDNS = true; };
     openFirewall = true;
     securityType = "user";
     extraConfig = ''
       workgroup = ${workgroup}
-      server string = ${config.networking.hostName}
-      netbios name = ${config.networking.hostName}
+      mdns name = mdns
       security = user
       #use sendfile = yes
       #max protocol = smb2