nixos/tests/sftpgo: fix eval
This commit is contained in:
parent
a101216526
commit
969a309b9e
1 changed files with 6 additions and 6 deletions
|
@ -17,7 +17,7 @@ let
|
|||
|
||||
# Returns an attributeset of users who are not system users.
|
||||
normalUsers = config:
|
||||
filterAttrs (name: user: user.isNormalUser) config.users.users;
|
||||
lib.filterAttrs (name: user: user.isNormalUser) config.users.users;
|
||||
|
||||
# Returns true if a user is a member of the given group
|
||||
isMemberOf =
|
||||
|
@ -26,7 +26,7 @@ let
|
|||
groupName:
|
||||
# users.users attrset
|
||||
user:
|
||||
any (x: x == user.name) config.users.groups.${groupName}.members;
|
||||
lib.any (x: x == user.name) config.users.groups.${groupName}.members;
|
||||
|
||||
# Generates a valid SFTPGo user configuration for a given user
|
||||
# Will be converted to JSON and loaded on application startup.
|
||||
|
@ -144,7 +144,7 @@ in
|
|||
{
|
||||
name = "sftpgo";
|
||||
|
||||
meta.maintainers = with maintainers; [ yayayayaka ];
|
||||
meta.maintainers = with lib.maintainers; [ yayayayaka ];
|
||||
|
||||
nodes = {
|
||||
server = { nodes, ... }: {
|
||||
|
@ -228,7 +228,7 @@ in
|
|||
# Created shared folder directories
|
||||
"d ${statePath}/${sharedFolderName} 2770 ${sftpgoUser} ${sharedFolderName} -"
|
||||
]
|
||||
++ mapAttrsToList (name: user:
|
||||
++ lib.mapAttrsToList (name: user:
|
||||
# Create private user directories
|
||||
''
|
||||
d ${statePath}/users/${user.name} 0700 ${sftpgoUser} ${sftpgoGroup} -
|
||||
|
@ -273,12 +273,12 @@ in
|
|||
networking.firewall.allowedTCPPorts = [ 22 80 ];
|
||||
services.sftpgo = {
|
||||
settings = {
|
||||
sftpd.bindings = mkForce [{
|
||||
sftpd.bindings = lib.mkForce [{
|
||||
address = "";
|
||||
port = 22;
|
||||
}];
|
||||
|
||||
httpd.bindings = mkForce [{
|
||||
httpd.bindings = lib.mkForce [{
|
||||
address = "";
|
||||
port = 80;
|
||||
}];
|
||||
|
|
Loading…
Reference in a new issue