From d4ed4ae9f100f2f691f10f8ca96e92921e0a5685 Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 13 Jul 2023 06:44:22 +0000 Subject: [PATCH] librewolf: *always* back the dot dir by a real disk this saves ram on memory-constrained devices --- hosts/common/programs/web-browser.nix | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/hosts/common/programs/web-browser.nix b/hosts/common/programs/web-browser.nix index 26e54764..9a1e61d7 100644 --- a/hosts/common/programs/web-browser.nix +++ b/hosts/common/programs/web-browser.nix @@ -238,14 +238,20 @@ in }) (mkIf config.sane.programs.web-browser.enabled { # TODO: move the persistence into the sane.programs API (above) - # flush the cache to disk to avoid it taking up too much tmp - sane.user.persist.byPath."${cfg.browser.cacheDir}" = lib.mkIf (cfg.persistCache != null) { - store = cfg.persistCache; - }; + # flush the cache to disk to avoid it taking up too much tmp. + sane.user.persist.byPath."${cfg.browser.cacheDir}".store = + if (cfg.persistData != null) then + cfg.persistData + else + "cryptClearOnBoot" + ; - sane.user.persist.byPath."${cfg.browser.dotDir}/default" = lib.mkIf (cfg.persistData != null) { - store = cfg.persistData; - }; + sane.user.persist.byPath."${cfg.browser.dotDir}/default".store = + if (cfg.persistData != null) then + cfg.persistData + else + "cryptClearOnBoot" + ; }) ]; }