mirror of
https://github.com/harryssecret/homelab-nix.git
synced 2025-01-18 21:29:33 +01:00
fix: adapted samba for nixos 24.11
This commit is contained in:
parent
7a495909b9
commit
4b88a9038c
|
@ -18,42 +18,43 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
securityType = "user";
|
securityType = "user";
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
settings = ''
|
settings = {
|
||||||
workgroup = WORKGROUP
|
global = {
|
||||||
server string = hyperserver
|
security = "user";
|
||||||
netbios name = hyperserver
|
"hosts allow" = "192.168.1. 127.0.0.1 localhost";
|
||||||
security = user
|
"hosts deny" = "0.0.0.0/0";
|
||||||
'';
|
"guest account" = "nobody";
|
||||||
shares = {
|
"map to guest" = "bad user";
|
||||||
music = {
|
};
|
||||||
|
"music" = {
|
||||||
path = "/srv/media/Music";
|
path = "/srv/media/Music";
|
||||||
browseable = "yes";
|
browseable = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"create mask" = "0644";
|
"create mask" = "0644";
|
||||||
"directory mask" = "0655";
|
"directory mask" = "0755";
|
||||||
};
|
};
|
||||||
ebooks = {
|
"ebooks" = {
|
||||||
path = "${cfg.dir}/Ebooks";
|
path = "${cfg.dir}/Ebooks";
|
||||||
browseable = "yes";
|
browseable = "yes";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"create mask" = "0644";
|
"create mask" = "0644";
|
||||||
"directory mask" = "0655";
|
"directory mask" = "0755";
|
||||||
};
|
};
|
||||||
movies = {
|
"movies" = {
|
||||||
path = "${cfg.dir}/Films";
|
path = "${cfg.dir}/Films";
|
||||||
browseable = "yes";
|
browseable = "yes";
|
||||||
"create mask" = "0644";
|
"create mask" = "0644";
|
||||||
"directory mask" = "0655";
|
"directory mask" = "0755";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
};
|
};
|
||||||
shows = {
|
"shows" = {
|
||||||
path = "${cfg.dir}/SeriesTV";
|
path = "${cfg.dir}/SeriesTV";
|
||||||
"read only" = "no";
|
"read only" = "no";
|
||||||
"create mask" = "0644";
|
"create mask" = "0644";
|
||||||
"directory mask" = "0755";
|
"directory mask" = "0755";
|
||||||
browseable = "yes";
|
browseable = "yes";
|
||||||
};
|
};
|
||||||
torrents = {
|
"torrents" = {
|
||||||
path = "${cfg.dir}/Torrents";
|
path = "${cfg.dir}/Torrents";
|
||||||
"read only" = "yes";
|
"read only" = "yes";
|
||||||
"create mask" = "644";
|
"create mask" = "644";
|
||||||
|
@ -63,4 +64,16 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.samba-wsdd = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
services.avahi = {
|
||||||
|
enable = true;
|
||||||
|
publish.enable = true;
|
||||||
|
publish.userServices = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue