Skip to content

Commit

Permalink
Fixed Samba service config
Browse files Browse the repository at this point in the history
Follows changes made in NixOS/nixpkgs#302681
  • Loading branch information
joegilkes committed Sep 12, 2024
1 parent a50ad1f commit 3a00a91
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions modules/nixos/services/samba/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ in
config = mkIf cfg.enable {
services.samba = {
enable = true;
securityType = "user";
openFirewall = true;

extraConfig = ''
workgroup = WORKGROUP
server string = ${ cfg.serverName }
netbios name = ${ cfg.serverName }
security = user
#use sendfile = yes
#max protocol = smb2
# note: localhost is the ipv6 localhost ::1
hosts allow = 192.168.0. 127.0.0.1 localhost
hosts deny = 0.0.0.0/0
guest account = nobody
map to guest = bad user
'';

shares = (
settings = {
global = {
"workgroup" = "WORKGROUP";
"server string" = cfg.serverName;
"netbios name" = cfg.serverName;
"security" = "user";
"security type" = "user";
#use sendfile = yes
#max protocol = smb2
# note: localhost is the ipv6 localhost ::1
"hosts allow" = [ "192.168.0." "127.0.0.1" "localhost" ];
"hosts deny" = "0.0.0.0/0";
"guest account" = "nobody";
"map to guest" = "bad user";
};
} // (
mapAttrs (name: value: {
path = value;
browseable = "yes";
Expand Down

0 comments on commit 3a00a91

Please sign in to comment.