575 current 1970-01-01 01:00:00 24.11.20250221.11415c7 6.6.79 *
This commit is contained in:
parent
bfc3ee5264
commit
c7a2912aa3
@ -54,48 +54,71 @@ in {
|
|||||||
|
|
||||||
home.packages = with pkgs; [rclone fuse3];
|
home.packages = with pkgs; [rclone fuse3];
|
||||||
|
|
||||||
systemd.user.services = {
|
systemd.user = {
|
||||||
luhbots-mount = {
|
services = {
|
||||||
Unit = {
|
luhbots-mount = {
|
||||||
Description = "Mount the luhbots nextcloud";
|
Unit = {
|
||||||
After = ["network-online.target"];
|
Description = "Mount the luhbots nextcloud";
|
||||||
|
After = ["network-online.target"];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "notify";
|
||||||
|
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p \"%h/luhbots Nextcloud\"";
|
||||||
|
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.sops.templates."rclone.conf".path} --vfs-cache-mode full mount \"luhbots:\" \"%h/luhbots Nextcloud\"";
|
||||||
|
ExecStop = "/bin/fusermount -u \"%h/luhbots Nextcloud\"";
|
||||||
|
Environment = ["PATH=/run/wrappers/bin/:$PATH"];
|
||||||
|
};
|
||||||
|
Install.WantedBy = ["default.target"];
|
||||||
};
|
};
|
||||||
Service = {
|
music-mount = {
|
||||||
Type = "notify";
|
Unit = {
|
||||||
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p \"%h/luhbots Nextcloud\"";
|
Description = "Mount the music directory from my cloud";
|
||||||
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.sops.templates."rclone.conf".path} --vfs-cache-mode full mount \"luhbots:\" \"%h/luhbots Nextcloud\"";
|
After = ["network-online.target"];
|
||||||
ExecStop = "/bin/fusermount -u \"%h/luhbots Nextcloud\"";
|
};
|
||||||
Environment = ["PATH=/run/wrappers/bin/:$PATH"];
|
Service = {
|
||||||
|
Type = "notify";
|
||||||
|
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p \"%h/Music\"";
|
||||||
|
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.sops.templates."rclone.conf".path} --vfs-cache-mode full mount \"cloud:Music\" \"%h/Music\"";
|
||||||
|
ExecStop = "/bin/fusermount -u \"%h/Music\"";
|
||||||
|
Environment = ["PATH=/run/wrappers/bin/:$PATH"];
|
||||||
|
};
|
||||||
|
Install.WantedBy = ["default.target"];
|
||||||
|
};
|
||||||
|
videos-mount = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Mount the videos directory from my cloud";
|
||||||
|
After = ["network-online.target"];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "notify";
|
||||||
|
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p \"%h/Videos\"";
|
||||||
|
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.sops.templates."rclone.conf".path} --vfs-cache-mode full mount \"cloud:Videos\" \"%h/Videos\"";
|
||||||
|
ExecStop = "/bin/fusermount -u \"%h/Videos\"";
|
||||||
|
Environment = ["PATH=/run/wrappers/bin/:$PATH"];
|
||||||
|
};
|
||||||
|
Install.WantedBy = ["default.target"];
|
||||||
|
};
|
||||||
|
sync-Documents = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Sync the Documents folder with the cloud Documents folder using bisync";
|
||||||
|
After = ["network-online.target"];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.sops.templates."rclone.conf".path} --resilient --recover --exclude-from %h/Documents/sync-exclude.txt bisync cloud:Documents %h/Documents";
|
||||||
|
};
|
||||||
|
Install.WantedBy = ["default.target"];
|
||||||
};
|
};
|
||||||
Install.WantedBy = ["default.target"];
|
|
||||||
};
|
};
|
||||||
music-mount = {
|
timers = {
|
||||||
Unit = {
|
sync-Documents = {
|
||||||
Description = "Mount the music directory from my cloud";
|
Unit.Description = "Sync Documents folder every half hour";
|
||||||
After = ["network-online.target"];
|
Timer = {
|
||||||
|
OnBootSec = "15min";
|
||||||
|
OnUnitActiveSec = "30min";
|
||||||
|
};
|
||||||
|
Install.WantedBy = ["timers.target"];
|
||||||
};
|
};
|
||||||
Service = {
|
|
||||||
Type = "notify";
|
|
||||||
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p \"%h/Music\"";
|
|
||||||
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.sops.templates."rclone.conf".path} --vfs-cache-mode full mount \"cloud:Music\" \"%h/Music\"";
|
|
||||||
ExecStop = "/bin/fusermount -u \"%h/Music\"";
|
|
||||||
Environment = ["PATH=/run/wrappers/bin/:$PATH"];
|
|
||||||
};
|
|
||||||
Install.WantedBy = ["default.target"];
|
|
||||||
};
|
|
||||||
videos-mount = {
|
|
||||||
Unit = {
|
|
||||||
Description = "Mount the videos directory from my cloud";
|
|
||||||
After = ["network-online.target"];
|
|
||||||
};
|
|
||||||
Service = {
|
|
||||||
Type = "notify";
|
|
||||||
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p \"%h/Videos\"";
|
|
||||||
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.sops.templates."rclone.conf".path} --vfs-cache-mode full mount \"cloud:Videos\" \"%h/Videos\"";
|
|
||||||
ExecStop = "/bin/fusermount -u \"%h/Videos\"";
|
|
||||||
Environment = ["PATH=/run/wrappers/bin/:$PATH"];
|
|
||||||
};
|
|
||||||
Install.WantedBy = ["default.target"];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user