diff --git a/hosts/profiles/sync/music/default.nix b/hosts/profiles/sync/music/default.nix index 7e9c1be6..b1f2020d 100644 --- a/hosts/profiles/sync/music/default.nix +++ b/hosts/profiles/sync/music/default.nix @@ -5,6 +5,8 @@ serviceConfig.Type = "oneshot"; path = [ pkgs.coreutils + pkgs.openssh + pkgs.gawk pkgs.rsync pkgs.beets ]; @@ -13,7 +15,7 @@ User = "anish"; }; }; - systemd.timers.get-music-timer = { + systemd.timers.get-music-sync = { wantedBy = [ "timers.target" ]; partOf = [ "get-music-sync.service" ]; timerConfig.OnCalendar = [ "hourly" ]; diff --git a/hosts/profiles/sync/music/get-music.sh b/hosts/profiles/sync/music/get-music.sh index 6d9faf4c..5d67289a 100755 --- a/hosts/profiles/sync/music/get-music.sh +++ b/hosts/profiles/sync/music/get-music.sh @@ -45,6 +45,8 @@ while IFS= read -r album; do # Import to beets echo "$(date): Importing $album to beets..." >>"$LOG_FILE" + # Set umask to allow group read/write access + umask 002 if beet -p fetchart import -m -l /home/anish/music.log -q -g "$LOCAL_PATH/$album"; then echo "$(date): Successfully imported $album to beets" >>"$LOG_FILE" else