sftpman: add missing options

- `authType` is missing the `authentication-agent` enum value
- `mountDestPath` is missing completely
This commit is contained in:
Michael Strobel
2026-01-08 12:05:23 +01:00
committed by Austin Horstman
parent 7688293f06
commit 3351348827
6 changed files with 32 additions and 0 deletions

View File

@@ -40,6 +40,12 @@ let
description = "The remote path to mount."; description = "The remote path to mount.";
}; };
mountDestPath = mkOption {
type = types.nullOr types.str;
default = null;
description = "The path on the current machine where the remote path would be mounted.";
};
authType = mkOption { authType = mkOption {
type = types.enum [ type = types.enum [
"password" "password"
@@ -47,6 +53,7 @@ let
"hostbased" "hostbased"
"keyboard-interactive" "keyboard-interactive"
"gssapi-with-mic" "gssapi-with-mic"
"authentication-agent"
]; ];
default = "publickey"; default = "publickey";
description = "The authentication method to use."; description = "The authentication method to use.";

View File

@@ -23,6 +23,13 @@
user = "user"; user = "user";
sshKey = "/home/user/.ssh/id_rsa"; sshKey = "/home/user/.ssh/id_rsa";
}; };
mount4 = {
host = "host4.example.com";
mountPoint = "/another/path/somewhere/else";
user = "user";
authType = "authentication-agent";
mountDestPath = "/mnt/host4";
};
}; };
}; };
@@ -36,5 +43,8 @@
assertFileContent \ assertFileContent \
home-files/.config/sftpman/mounts/mount3.json \ home-files/.config/sftpman/mounts/mount3.json \
${./expected-mount3.json} ${./expected-mount3.json}
assertFileContent \
home-files/.config/sftpman/mounts/mount4.json \
${./expected-mount4.json}
''; '';
} }

View File

@@ -3,6 +3,7 @@
"beforeMount": "true", "beforeMount": "true",
"host": "host1.example.com", "host": "host1.example.com",
"id": "mount1", "id": "mount1",
"mountDestPath": null,
"mountOptions": [ "mountOptions": [
"idmap=user" "idmap=user"
], ],

View File

@@ -3,6 +3,7 @@
"beforeMount": "true", "beforeMount": "true",
"host": "host2.example.com", "host": "host2.example.com",
"id": "mount2", "id": "mount2",
"mountDestPath": null,
"mountOptions": [], "mountOptions": [],
"mountPoint": "/another/path", "mountPoint": "/another/path",
"port": 22, "port": 22,

View File

@@ -3,6 +3,7 @@
"beforeMount": "true", "beforeMount": "true",
"host": "host3.example.com", "host": "host3.example.com",
"id": "mount3", "id": "mount3",
"mountDestPath": null,
"mountOptions": [], "mountOptions": [],
"mountPoint": "/yet/another/path", "mountPoint": "/yet/another/path",
"port": 22, "port": 22,

View File

@@ -0,0 +1,12 @@
{
"authType": "authentication-agent",
"beforeMount": "true",
"host": "host4.example.com",
"id": "mount4",
"mountDestPath": "/mnt/host4",
"mountOptions": [],
"mountPoint": "/another/path/somewhere/else",
"port": 22,
"sshKey": "/home/user/.ssh/id_ed25519",
"user": "user"
}