move home-manager components to their own sections; create new systemd service to sync rclone

This commit is contained in:
2024-12-27 15:35:18 +00:00
parent 5901535d77
commit 2c947ed70c
8 changed files with 273 additions and 214 deletions

View File

@@ -45,35 +45,10 @@
};
};
# [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 = [ "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"
# '';
# };
# Open ports in the firewall.
# 443 Helldivers crashes internet otherwise
# 1900 UPNP discovery
# 5001 Universal Media Server
networking.firewall.allowedTCPPorts = [ 443 1900 5001 ];
networking.firewall.allowedUDPPorts = [ 443 1900 ];
}