summary refs log tree commit diff
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2023-07-28 22:27:17 -0300
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-08-01 10:12:12 +0000
commit2dd9923c8aa058b7b2df28a6dfdae40d7defe3e3 (patch)
tree0c75ea14c5a0e22dbfe98685bc62a5477291dc42
parentc5ffb694d9789688ae52af1fa9d528607be1e8e1 (diff)
downloadnixpkgs-2dd9923c8aa058b7b2df28a6dfdae40d7defe3e3.tar
nixpkgs-2dd9923c8aa058b7b2df28a6dfdae40d7defe3e3.tar.gz
nixpkgs-2dd9923c8aa058b7b2df28a6dfdae40d7defe3e3.tar.bz2
nixpkgs-2dd9923c8aa058b7b2df28a6dfdae40d7defe3e3.tar.lz
nixpkgs-2dd9923c8aa058b7b2df28a6dfdae40d7defe3e3.tar.xz
nixpkgs-2dd9923c8aa058b7b2df28a6dfdae40d7defe3e3.tar.zst
nixpkgs-2dd9923c8aa058b7b2df28a6dfdae40d7defe3e3.zip
nixos/tests/sftpgo.nix: remove overuses of `with`
-rw-r--r--nixos/tests/sftpgo.nix10
1 files changed, 4 insertions, 6 deletions
diff --git a/nixos/tests/sftpgo.nix b/nixos/tests/sftpgo.nix
index ca55b9c962a..8cd5675c1d4 100644
--- a/nixos/tests/sftpgo.nix
+++ b/nixos/tests/sftpgo.nix
@@ -12,8 +12,6 @@
 # would be a nice to have for the future.
 { pkgs, lib, ...  }:
 
-with lib;
-
 let
   inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey;
 
@@ -54,7 +52,7 @@ let
       # inside the dataprovider they will be automatically created.
       # You have to create the folder on the filesystem yourself
       virtual_folders =
-        optional (isMemberOf config sharedFolderName user) {
+        lib.optional (lib.isMemberOf config sharedFolderName user) {
           name = sharedFolderName;
           mapped_path = "${config.services.sftpgo.dataDir}/${sharedFolderName}";
           virtual_path = "/${sharedFolderName}";
@@ -62,10 +60,10 @@ let
 
       # Defines the ACL on the virtual filesystem
       permissions =
-        recursiveUpdate {
+        lib.recursiveUpdate {
           "/" = [ "list" ];     # read-only top level directory
           "/private" = [ "*" ]; # private subdirectory, not shared with others
-        } (optionalAttrs (isMemberOf config "shared" user) {
+        } (lib.optionalAttrs (lib.isMemberOf config "shared" user) {
           "/shared" = [ "*" ];
         });
 
@@ -91,7 +89,7 @@ let
   # of users and folders to import to SFTPGo.
   loadDataJson = config: pkgs.writeText "users-and-folders.json" (builtins.toJSON {
     users =
-      mapAttrsToList (name: user: generateUserAttrSet config user) (normalUsers config);
+      lib.mapAttrsToList (name: user: lib.generateUserAttrSet config user) (normalUsers config);
 
     folders = [
       {