mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
27 lines
666 B
Nix
27 lines
666 B
Nix
{ pkgs, lib, ... }:
|
|
let
|
|
sshKeys = import "${pkgs.path}/nixos/tests/ssh-keys.nix" pkgs;
|
|
in
|
|
{
|
|
programs.rclone.remotes = {
|
|
alices-sftp-remote = {
|
|
config = {
|
|
type = "sftp";
|
|
host = "remote";
|
|
user = "alice";
|
|
# https://rclone.org/sftp/#ssh-authentication
|
|
key_pem = lib.pipe sshKeys.snakeOilEd25519PrivateKey.text [
|
|
lib.trim
|
|
(lib.replaceStrings [ "\n" ] [ "\\n" ])
|
|
];
|
|
known_hosts = sshKeys.snakeOilEd25519PublicKey;
|
|
};
|
|
mounts = {
|
|
"/home/alice/files" = {
|
|
enable = true;
|
|
mountPoint = "/home/alice/remote-files";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|