nixos-config/modules/workspace/rclone.nix

32 lines
1023 B
Nix
Raw Normal View History

2020-02-17 17:00:59 +04:00
{ pkgs, config, lib, ... }: {
2020-04-29 03:18:36 +04:00
home-manager.users.balsoft = lib.mkIf (!isNull config.secrets.rclone) {
2020-02-17 17:00:59 +04:00
xdg.configFile."rclone/rclone.conf.home".text = config.secrets.rclone;
home.activation."rclone" = {
after = [ "linkGeneration" ];
before = [ ];
data = ''
cp ./.config/rclone/rclone.conf.home ./.config/rclone/rclone.conf
chmod 700 ./.config/rclone/rclone.conf
mkdir -p cloud; cd cloud
mkdir -p 'Google Drive' || true
mkdir -p 'Yandex Disk' || true
mkdir -p 'Dropbox' || true
'';
};
xsession.windowManager.i3.config.startup = [
{
command =
2020-04-29 03:18:36 +04:00
"${pkgs.rclone}/bin/rclone mount google:/ '/home/balsoft/cloud/Google Drive' --daemon";
2020-02-17 17:00:59 +04:00
}
{
command =
2020-04-29 03:18:36 +04:00
"${pkgs.rclone}/bin/rclone mount Yandex:/ '/home/balsoft/cloud/Yandex Disk' --daemon";
2020-02-17 17:00:59 +04:00
}
{
command =
2020-04-29 03:18:36 +04:00
"${pkgs.rclone}/bin/rclone mount Dropbox:/ '/home/balsoft/cloud/Dropbox' --daemon";
2020-02-17 17:00:59 +04:00
}
];
};
}