2022-12-04 16:10:00 +00:00
|
|
|
{config, ...}: {
|
2022-12-04 13:45:43 +00:00
|
|
|
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"
|
2023-08-01 18:48:59 +01:00
|
|
|
"Mounts/Personal-Crypt"
|
2022-12-04 13:45:43 +00:00
|
|
|
"Mounts/Public"
|
|
|
|
"Mounts/Temp1"
|
|
|
|
"Mounts/Temp2"
|
|
|
|
];
|
2023-08-29 14:07:17 +01:00
|
|
|
|
|
|
|
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 .
|
|
|
|
'';
|
|
|
|
};
|
2022-11-10 14:57:07 +00:00
|
|
|
}
|