working on rclone service

This commit is contained in:
2024-12-17 23:10:44 +00:00
parent 1f40a05fae
commit 5901535d77
3 changed files with 69 additions and 8 deletions

View File

@@ -286,4 +286,46 @@ in
};
};
};
# systemd.user = {
# enable = true;
# paths = {
# rclone-media = {
# Unit = {
# Description = "rclone unit path for /mnt/HDD1/Videos/";
# After = [ "network.target" "mnt-HDD1.mount" ];
# };
# Path = {
# PathChanged = "/mnt/HDD1/Videos/";
# };
# Install = {
# WantedBy = [ "default.target" ];
# };
# };
# };
# services = {
# rclone-media = {
# Unit = {
# Description = "rclone unit service for /mnt/HDD1/Videos/";
# };
# Service = {
# Type = "oneshot";
# ExecStart = "${pkgs.writeShellApplication {
# name = "rclone-media";
# runtimeInputs = [ pkgs.libnotify pkgs.rclone ];
# text = ''
# notify-send -a "rclone-media" "rclone for /mnt/HDD1/Videos/ triggered"
# rclone copy --max-age 24h --no-traverse "/mnt/HDD1/Videos/" media:"media-7gM2gcrxRjXqfj" -P --dry-run
# notify-send -a "rclone-media" "rclone for /mnt/HDD1/Videos/ complete"
# '';
# }}/bin/rclone-media";
# };
# };
# };
# };
}