nixos/tests/sftpgo: fix eval

This commit is contained in:
K900 2023-10-07 00:10:50 +03:00
parent 29535e40ef
commit b854f27f47

View File

@ -52,7 +52,7 @@ let
# inside the dataprovider they will be automatically created.
# You have to create the folder on the filesystem yourself
virtual_folders =
lib.optional (lib.isMemberOf config sharedFolderName user) {
lib.optional (isMemberOf config sharedFolderName user) {
name = sharedFolderName;
mapped_path = "${config.services.sftpgo.dataDir}/${sharedFolderName}";
virtual_path = "/${sharedFolderName}";
@ -63,7 +63,7 @@ let
lib.recursiveUpdate {
"/" = [ "list" ]; # read-only top level directory
"/private" = [ "*" ]; # private subdirectory, not shared with others
} (lib.optionalAttrs (lib.isMemberOf config "shared" user) {
} (lib.optionalAttrs (isMemberOf config "shared" user) {
"/shared" = [ "*" ];
});
@ -89,7 +89,7 @@ let
# of users and folders to import to SFTPGo.
loadDataJson = config: pkgs.writeText "users-and-folders.json" (builtins.toJSON {
users =
lib.mapAttrsToList (name: user: lib.generateUserAttrSet config user) (normalUsers config);
lib.mapAttrsToList (name: user: generateUserAttrSet config user) (normalUsers config);
folders = [
{