diff --git a/hosts/common/home/fs.nix b/hosts/common/home/fs.nix index 5f11dcf8b..93e9977d8 100644 --- a/hosts/common/home/fs.nix +++ b/hosts/common/home/fs.nix @@ -6,6 +6,9 @@ "dev" "ref" "use" + "Books/Audiobook" + "Books/Books" + "Books/Visual" "Books/local" "Music" diff --git a/hosts/common/programs/cozy.nix b/hosts/common/programs/cozy.nix index 717857688..a813b9a6b 100644 --- a/hosts/common/programs/cozy.nix +++ b/hosts/common/programs/cozy.nix @@ -19,6 +19,7 @@ sandbox.whitelistDbus = [ "user" ]; # mpris sandbox.whitelistWayland = true; sandbox.extraHomePaths = [ + "Books/Audiobooks" "Books/local" "Books/servo" ]; diff --git a/hosts/common/programs/engrampa.nix b/hosts/common/programs/engrampa.nix index 9eca362e8..27cc4c118 100644 --- a/hosts/common/programs/engrampa.nix +++ b/hosts/common/programs/engrampa.nix @@ -6,6 +6,9 @@ sandbox.autodetectCliPaths = "existingOrParent"; sandbox.extraHomePaths = [ "archive" + "Books/Audiobooks" + "Books/Books" + "Books/Visual" "Books/local" "Books/servo" "records" diff --git a/hosts/common/programs/foliate.nix b/hosts/common/programs/foliate.nix index 9a711cc4f..4e4869b5c 100644 --- a/hosts/common/programs/foliate.nix +++ b/hosts/common/programs/foliate.nix @@ -7,6 +7,7 @@ sandbox.whitelistDri = true; # reduces startup time and subjective page flip time sandbox.whitelistWayland = true; sandbox.extraHomePaths = [ + "Books/Books" "Books/local" "Books/servo" "tmp" #< for downloaded files diff --git a/hosts/common/programs/koreader/default.nix b/hosts/common/programs/koreader/default.nix index 0f1d1dbb5..f0ff0db16 100644 --- a/hosts/common/programs/koreader/default.nix +++ b/hosts/common/programs/koreader/default.nix @@ -50,6 +50,7 @@ in { sandbox.whitelistDri = true; # reduces startup time and subjective page flip time sandbox.whitelistWayland = true; sandbox.extraHomePaths = [ + "Books/Books" "Books/local" "Books/servo" ]; diff --git a/hosts/common/programs/mpv/default.nix b/hosts/common/programs/mpv/default.nix index 382b6cba8..a630fd8d7 100644 --- a/hosts/common/programs/mpv/default.nix +++ b/hosts/common/programs/mpv/default.nix @@ -194,6 +194,8 @@ in ".local/share/applications" #< for xdg-terminal-exec (sane-cast) # it's common for album (or audiobook, podcast) images/lyrics/metadata to live adjacent to the primary file. # CLI detection is too poor to pick those up, so expose the common media dirs to the sandbox to make that *mostly* work. + "Books/Audiobooks" + "Books/Visual" "Books/local" "Books/servo" "Music" diff --git a/hosts/common/programs/rofi/default.nix b/hosts/common/programs/rofi/default.nix index 492116721..13268eac3 100644 --- a/hosts/common/programs/rofi/default.nix +++ b/hosts/common/programs/rofi/default.nix @@ -99,6 +99,9 @@ in sandbox.extraHomePaths = [ ".local/share/applications" #< to locate .desktop files "Apps" #< provide a means to transition from the filebrowser to the app launcher + "Books/Audiobooks" + "Books/Books" + "Books/Visual" "Books/local" "Books/servo" "Music" diff --git a/hosts/common/programs/xdg-desktop-portal-gnome/default.nix b/hosts/common/programs/xdg-desktop-portal-gnome/default.nix index 7ddd48dea..7164c888d 100644 --- a/hosts/common/programs/xdg-desktop-portal-gnome/default.nix +++ b/hosts/common/programs/xdg-desktop-portal-gnome/default.nix @@ -20,6 +20,9 @@ in # for file-chooser portal users (fractal, firefox, ...), need to provide anything they might want. # i think (?) portal users can only access the files here interactively, i.e. by me interacting with the portal's visual filechooser, # so shoving stuff here is trusting the portal but not granting any trust to the portal user. + "Books/Audiobooks" + "Books/Books" + "Books/Visual" "Books/local" "Books/servo" "Music" diff --git a/hosts/common/programs/xdg-desktop-portal-gtk.nix b/hosts/common/programs/xdg-desktop-portal-gtk.nix index 4a8328f86..e91047f56 100644 --- a/hosts/common/programs/xdg-desktop-portal-gtk.nix +++ b/hosts/common/programs/xdg-desktop-portal-gtk.nix @@ -14,6 +14,9 @@ in # for file-chooser portal users (fractal, firefox, ...), need to provide anything they might want. # i think (?) portal users can only access the files here interactively, i.e. by me interacting with the portal's visual filechooser, # so shoving stuff here is trusting the portal but not granting any trust to the portal user. + "Books/Audiobooks" + "Books/Books" + "Books/Visual" "Books/local" "Books/servo" "Music" diff --git a/scripts/sync b/scripts/sync index 260edc400..7ab6117ca 100755 --- a/scripts/sync +++ b/scripts/sync @@ -59,7 +59,7 @@ syncHost() { rsync -arv --exclude servo-macros "$mobyHome/Pictures/" "$deskoHome/Pictures/from/moby/" # copy books from servo to moby; delete old/untracked ones, but keep KOreader state files (sdr) ifExists /mnt/servo/media/Books/Books \ - rsync -arv --delete --exclude '*.sdr' /mnt/servo/media/Books/ "$mobyHome/Books/local/servo/" + rsync -arv --delete --exclude '*.sdr' /mnt/servo/media/Books/ "$mobyHome/Books/" # copy music ifExists /mnt/servo/media/Music/Various.Artists \ sane-sync-music --compat /mnt/servo/media/Music "$mobyHome/Music" "${syncFlags[@]}"