Require auth for public samba share
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user