modules/external-storage: support setting uid and gid for underlays

This commit is contained in:
Max Headroom 2023-08-28 02:19:39 +02:00
parent a656a5c895
commit 8061af645d
2 changed files with 12 additions and 0 deletions

View file

@ -49,6 +49,10 @@ in
"credentials=${config.age.secrets."cifsCredentials-${name}".path}" "credentials=${config.age.secrets."cifsCredentials-${name}".path}"
"dir_mode=0700" "dir_mode=0700"
"file_mode=0600" "file_mode=0600"
"uid=${toString ul.uid}"
"gid=${toString ul.gid}"
"forceuid"
"forcegid"
"seal" "seal"
"hard" "hard"
"resilienthandles" "resilienthandles"

View file

@ -28,5 +28,13 @@ with lib;
type = types.path; type = types.path;
default = "/"; default = "/";
}; };
uid = mkOption {
type = types.int;
default = 0;
};
gid = mkOption {
type = types.int;
default = 0;
};
}; };
} }