Rclone: Difference between revisions

Onny (talk | contribs)
Note on Sshfs
Add home-manager related information.
Line 24: Line 24:
};
};
</syntaxhighlight>This can be also done with [[SSHFS]] while Rclone seems to be more robust for unstable connections.
</syntaxhighlight>This can be also done with [[SSHFS]] while Rclone seems to be more robust for unstable connections.
== Configuration with Home-Manager ==
Home-manager users may wish to make a user-centric configuration of rclone. To do so add <code>pkgs.rclone</code> to your <code>~/.config/home-manager/home.nix</code> file. You can also configure remotes with home-manager. Here is an example below.<syntaxhighlight lang="nix">
  home.packages = [ pkgs.rclone ];
  home.file = {
      ".config/rclone/rclone.conf".text = ''
[fichier]
type = fichier
user = foo@bar.com
pass = password
    '';
  };
</syntaxhighlight>
You may also wish to create a systemd service for local filesystem mounts. Here is an example below. 
<syntaxhighlight lang="nix">
  systemd.user.services.rclone-mounts = {
    Unit.Description = "Mount my rclone mounts.";
    Install.WantedBy = [ "multi-user.target" ]; # starts after login
    Service.ExecStart = ''
    rclone mount fichier:"Path to mount" "Local path to mount"
  '';
</syntaxhighlight>Particular concern should be made when uploading such configurations online as your passwords will be plainly visible. It is recommended to instead put  the passwords in a local file if such is needed.
[[Category:Applications]]
[[Category:Applications]]
[[Category:Backup]]
[[Category:Backup]]