setup SMB in config file (provide smpasswd in terminal is needed too)

This commit is contained in:
Rob committed 2024-01-16 21:11:22 +00:00
1 parent e65d1b28ac
commit b67d5b20ae
4 files changed
+41 -44

No files matched your search

+1 -1
View File
@@ -1 +1 @@
/nix/store/f63q5ak4m5rxgway2sz1n7f1kgbcpgq7-nixos-system-bfds-23.11.2217.d02d818f22c7
/nix/store/sclc7xdap0rv2y88aaifir19b7475yp7-nixos-system-bfds-23.11.2217.d02d818f22c7
+39
View File
@@ -0,0 +1,39 @@
{ config, ... }:
{
services.samba-wsdd = {
# make shares visible for Windows clients
enable = true;
openFirewall = true;
};
services.samba = {
enable = true;
securityType = "user";
extraConfig = ''
workgroup = WORKGROUP
server string = smbnix
netbios name = smbnix
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 = {
public = {
path = "/bfds-nix/"; ## "/mnt/Shares/Public";
browseable = "yes";
"read only" = "no";
"guest ok" = "yes";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "username";
"force group" = "groupname";
};
};
};
}
-43
View File
@@ -1,43 +0,0 @@
{ config, ... }:
{
systemd.services.zfs-mount.enable = false;
networking.hostId = "07019099";
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.devNodes = "/dev/disk/by-id/ata-WDC_WD30EZRZ-00Z5HB0_WD-WCC4N7LL2J1S-part1"; #oder mit -part1 am ende
#fileSystems."/bfds-nix" =
# { device = "bfds-nix";
# fsType = "zfs";
# };
fileSystems."/bfds-nix/music" =
{ device = "bfds-nix/music";
fsType = "zfs";
};
fileSystems."/bfds-nix/rob" =
{ device = "bfds-nix/rob";
fsType = "zfs";
};
fileSystems."/bfds-nix/hoerbuecher" =
{ device = "bfds-nix/hoerbuecher";
fsType = "zfs";
};
fileSystems."/bfds-nix/movies" =
{ device = "bfds-nix/movies";
fsType = "zfs";
};
fileSystems."/bfds-nix/peggy" =
{ device = "bfds-nix/peggy";
fsType = "zfs";
};
fileSystems."/bfds-nix/ebooks" =
{ device = "bfds-nix/ebooks";
fsType = "zfs";
};
}