From 4ec2b7567f90368c4a6fe5d0b73c9002dc25b003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 17 Nov 2024 13:56:38 +0100 Subject: [PATCH] scope persist files --- programs/desktop/firefox/default.nix | 27 +++++++++++++++++++++++-- programs/desktop/pim/email.nix | 30 ++++++++++++++++++++++++++-- programs/shell/fish/home-manager.nix | 4 +++- 3 files changed, 56 insertions(+), 5 deletions(-) diff --git a/programs/desktop/firefox/default.nix b/programs/desktop/firefox/default.nix index 4c57bf09..26df6035 100644 --- a/programs/desktop/firefox/default.nix +++ b/programs/desktop/firefox/default.nix @@ -151,7 +151,30 @@ in message = ''Extension ${k} has unaccepted permissions: ${builtins.toJSON unaccepted}''; } ) extensions; - home.persistence.default.directories = [ - ".mozilla" + home.persistence.default.directories = map (f: ".mozilla/firefox/default/${f}") [ + "extension-store" + "extension-store-menus" + "storage" + "settings" + "security_state" + ]; + home.persistence.default.files = map (f: ".mozilla/firefox/default/${f}") [ + "addons.json" + "cookies.sqlite" + "extension-preferences.json" + "extension-settings.json" + "favicons.sqlite" + "formhistory.sqlite" + "key4.db" + "permissions.sqlite" + "places.sqlite" + "protections.sqlite" + "prefs.js" + "storage.sqlite" + "storage-sync-v2.sqlite" + "storage-sync-v2.sqlite-shm" + "storage-sync-v2.sqlite-wal" + "webappstore.sqlite" + "webappstore.sqlite-wal" ]; } diff --git a/programs/desktop/pim/email.nix b/programs/desktop/pim/email.nix index 27b2155c..f49aaa9a 100644 --- a/programs/desktop/pim/email.nix +++ b/programs/desktop/pim/email.nix @@ -54,7 +54,33 @@ withExternalGnupg = true; }; }; - home.persistence.default.directories = [ - ".thunderbird" + home.persistence.default.directories = map (f: ".thunderbird/default/${f}") [ + "calendar-data" + "ImapMail" + "Mail" + "settings" + "storage" + ]; + home.persistence.default.files = map (f: ".thunderbird/default/${f}") [ + "abook.sqlite" + "blist.sqlite" + "content-prefs.sqlite" + "cookies.sqlite" + "extension-preferences.json" + "extensions.json" + "favicons.sqlite" + "folderTree.json" + "formhistory.sqlite" + "global-messages-db.sqlite" + "history.sqlite" + "key4.db" + "logins.json" + "mailViews.dat" + "openpgp.sqlite" + "permissions.sqlite" + "places.sqlite" + "prefs.js" + "storage.sqlite" + "virtualFolders.dat" ]; } diff --git a/programs/shell/fish/home-manager.nix b/programs/shell/fish/home-manager.nix index 583a8e20..19d67cdb 100644 --- a/programs/shell/fish/home-manager.nix +++ b/programs/shell/fish/home-manager.nix @@ -17,8 +17,10 @@ } ]; }; + home.persistence.default.files = [ + ".local/share/fish/fish_history" + ]; home.persistence.default.directories = [ - ".local/share/fish" ".local/share/direnv" ]; programs.nix-index.enable = true;