working on rclone service
This commit is contained in:
@@ -165,8 +165,6 @@
|
||||
kdePackages.kcalc
|
||||
rar
|
||||
nixpkgs-fmt
|
||||
inotify-tools
|
||||
libnotify
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
|
||||
@@ -45,14 +45,35 @@
|
||||
};
|
||||
};
|
||||
|
||||
# systemd.user.services.my-cool-user-service = {
|
||||
# [Unit]
|
||||
# Description=Systemd unit to watch a folder for new files
|
||||
|
||||
# [Path]
|
||||
# PathChanged=/path/to/folder/you/want/to/monitor/
|
||||
|
||||
# [Install]
|
||||
# WantedBy=multi-user.target
|
||||
|
||||
# systemd.user.paths.rclone-media = {
|
||||
# enable = true;
|
||||
# description = "rclone unit path for /mnt/HDD1/Videos/";
|
||||
# after = [ "network.target" "mnt-HDD1.mount" ];
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# description = "rclone copy media";
|
||||
# serviceConfig = {
|
||||
# Type = "simple";
|
||||
# ExecStart = ''/my/cool/user/service'';
|
||||
# wantedBy = [ "default.target" ];
|
||||
# pathConfig = {
|
||||
# PathChanged = "/mnt/HDD1/Videos/";
|
||||
# };
|
||||
# };
|
||||
|
||||
# systemd.user.services.rclone-media = {
|
||||
# description = "rclone unit service for /mnt/HDD1/Videos/";
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# };
|
||||
# path = [ pkgs.libnotify pkgs.rclone ];
|
||||
# script = ''
|
||||
# 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"
|
||||
# '';
|
||||
# };
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user