From 609ccb4a3d2db51209fe353268b4aa9e45fd0b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Wed, 20 Nov 2024 08:38:58 +0100 Subject: [PATCH] use bind mounts for .mozilla and .thunderbird instead of symlinks --- programs/desktop/default.nix | 1 + programs/desktop/firefox/default.nix | 26 ------------------------- programs/desktop/firefox/system.nix | 7 +++++++ programs/desktop/pim/email.nix | 29 ---------------------------- 4 files changed, 8 insertions(+), 55 deletions(-) create mode 100644 programs/desktop/firefox/system.nix diff --git a/programs/desktop/default.nix b/programs/desktop/default.nix index c10c14c1..642c050b 100644 --- a/programs/desktop/default.nix +++ b/programs/desktop/default.nix @@ -4,6 +4,7 @@ ./steam ./kodi/system-config.nix ./pipewire.nix + ./firefox/system.nix ]; home-manager.users.darkkirb.imports = if config.isGraphical then diff --git a/programs/desktop/firefox/default.nix b/programs/desktop/firefox/default.nix index 37b5b317..bac49d5b 100644 --- a/programs/desktop/firefox/default.nix +++ b/programs/desktop/firefox/default.nix @@ -151,30 +151,4 @@ in message = ''Extension ${k} has unaccepted permissions: ${builtins.toJSON unaccepted}''; } ) extensions; - 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" - "webappsstore.sqlite" - "webappsstore.sqlite-wal" - ]; } diff --git a/programs/desktop/firefox/system.nix b/programs/desktop/firefox/system.nix new file mode 100644 index 00000000..bb434e09 --- /dev/null +++ b/programs/desktop/firefox/system.nix @@ -0,0 +1,7 @@ +{ ... }: +{ + environment.persistence."/persistent".directories = [ + "/home/darkkirb/.mozilla" + "/home/darkkirb/.thunderbird" + ]; +} diff --git a/programs/desktop/pim/email.nix b/programs/desktop/pim/email.nix index f49aaa9a..034c5994 100644 --- a/programs/desktop/pim/email.nix +++ b/programs/desktop/pim/email.nix @@ -54,33 +54,4 @@ withExternalGnupg = true; }; }; - 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" - ]; }