{config, ...}: { systemd.user.tmpfiles.rules = map (dir: "d ${config.home.homeDirectory}/${dir} - ${config.home.username} users") [ "Projects" "Temp" "Music" "Mounts" "Mounts/Storage" "Mounts/Storage-Public" "Mounts/Backups" "Mounts/Backups-Crypt" "Mounts/Photos-Crypt" "Mounts/Personal-Crypt" "Mounts/Public" "Mounts/Temp1" "Mounts/Temp2" ]; home.file."Music/music-sync.sh" = { executable = true; text = '' #!/usr/bin/env bash SCRIPT_DIR=$( cd -- "$( dirname -- "''${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) cd "''${SCRIPT_DIR}" rclone sync -P . Storage:Music --exclude music-sync.sh,music-download.sh restic-music backup $(fd -t d --max-depth=1 && fd -t f --max-depth=1) ~/Projects/music_library_website/update.sh ''; }; home.file."Music/music-download.sh" = { executable = true; text = '' #!/usr/bin/env bash SCRIPT_DIR=$( cd -- "$( dirname -- "''${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) cd "''${SCRIPT_DIR}" rclone sync -P --exclude music-sync.sh,music-download.sh Storage:Music . ''; }; }