Require auth for public samba share
This commit is contained in:
parent
8a1e0b76f1
commit
63902fcb46
@ -12,7 +12,7 @@ let
|
||||
auth_opts = "credentials=/run/agenix/smb-secrets";
|
||||
version_opts = "vers=2.1";
|
||||
|
||||
opts = "${network_opts},${user_opts},${version_opts}";
|
||||
opts = "${network_opts},${user_opts},${version_opts},${auth_opts}";
|
||||
in {
|
||||
options.services.mount-samba = {
|
||||
enable = lib.mkEnableOption "enable mounting samba shares";
|
||||
@ -22,13 +22,13 @@ in {
|
||||
fileSystems."/mnt/public" = {
|
||||
device = "//s0.zt.neet.dev/public";
|
||||
fsType = "cifs";
|
||||
options = ["guest,${opts}"];
|
||||
options = [ opts ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/private" = {
|
||||
device = "//s0.zt.neet.dev/googlebot";
|
||||
fsType = "cifs";
|
||||
options = ["${auth_opts},${opts}"];
|
||||
options = [ opts ];
|
||||
};
|
||||
|
||||
age.secrets.smb-secrets.file = ../../secrets/smb-secrets.age;
|
||||
|
@ -35,7 +35,7 @@
|
||||
path = "/data/samba/Public";
|
||||
browseable = "yes";
|
||||
"read only" = "no";
|
||||
"guest ok" = "yes";
|
||||
"guest ok" = "no";
|
||||
"create mask" = "0644";
|
||||
"directory mask" = "0755";
|
||||
"force user" = "public_data";
|
||||
|
Loading…
x
Reference in New Issue
Block a user