mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 09:29:41 +08:00
- `authType` is missing the `authentication-agent` enum value
- `mountDestPath` is missing completely
(cherry picked from commit 3351348827)
51 lines
1.3 KiB
Nix
51 lines
1.3 KiB
Nix
{
|
|
programs.sftpman = {
|
|
enable = true;
|
|
defaultSshKey = "/home/user/.ssh/id_ed25519";
|
|
|
|
mounts = {
|
|
mount1 = {
|
|
host = "host1.example.com";
|
|
mountPoint = "/path/to/somewhere";
|
|
user = "root";
|
|
mountOptions = [ "idmap=user" ];
|
|
};
|
|
mount2 = {
|
|
host = "host2.example.com";
|
|
mountPoint = "/another/path";
|
|
user = "someuser";
|
|
authType = "password";
|
|
sshKey = null;
|
|
};
|
|
mount3 = {
|
|
host = "host3.example.com";
|
|
mountPoint = "/yet/another/path";
|
|
user = "user";
|
|
sshKey = "/home/user/.ssh/id_rsa";
|
|
};
|
|
mount4 = {
|
|
host = "host4.example.com";
|
|
mountPoint = "/another/path/somewhere/else";
|
|
user = "user";
|
|
authType = "authentication-agent";
|
|
mountDestPath = "/mnt/host4";
|
|
};
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileContent \
|
|
home-files/.config/sftpman/mounts/mount1.json \
|
|
${./expected-mount1.json}
|
|
assertFileContent \
|
|
home-files/.config/sftpman/mounts/mount2.json \
|
|
${./expected-mount2.json}
|
|
assertFileContent \
|
|
home-files/.config/sftpman/mounts/mount3.json \
|
|
${./expected-mount3.json}
|
|
assertFileContent \
|
|
home-files/.config/sftpman/mounts/mount4.json \
|
|
${./expected-mount4.json}
|
|
'';
|
|
}
|