firefox: integrate the "persist" config into "sane.programs"
This commit is contained in:
parent
0d8307e877
commit
62b39bf01e
|
@ -326,7 +326,6 @@ in
|
||||||
// matrix: for Nheko matrix client
|
// matrix: for Nheko matrix client
|
||||||
defaultPref("network.protocol-handler.external.matrix", true);
|
defaultPref("network.protocol-handler.external.matrix", true);
|
||||||
'';
|
'';
|
||||||
fs."${cfg.browser.dotDir}/default".dir = {};
|
|
||||||
# instruct Firefox to put the profile in a predictable directory (so we can do things like persist just it).
|
# instruct Firefox to put the profile in a predictable directory (so we can do things like persist just it).
|
||||||
# XXX: the directory *must* exist, even if empty; Firefox will not create the directory itself.
|
# XXX: the directory *must* exist, even if empty; Firefox will not create the directory itself.
|
||||||
fs."${cfg.browser.dotDir}/profiles.ini".symlink.text = ''
|
fs."${cfg.browser.dotDir}/profiles.ini".symlink.text = ''
|
||||||
|
@ -344,24 +343,23 @@ in
|
||||||
env.PASSWORD_STORE_DIR = "/home/colin/knowledge/secrets/accounts";
|
env.PASSWORD_STORE_DIR = "/home/colin/knowledge/secrets/accounts";
|
||||||
# alternative to PASSWORD_STORE_DIR, but firejail doesn't handle this symlink well
|
# alternative to PASSWORD_STORE_DIR, but firejail doesn't handle this symlink well
|
||||||
# fs.".password-store".symlink.target = lib.mkIf cfg.addons.browserpass-extension.enable "knowledge/secrets/accounts";
|
# fs.".password-store".symlink.target = lib.mkIf cfg.addons.browserpass-extension.enable "knowledge/secrets/accounts";
|
||||||
};
|
|
||||||
})
|
# flush the cache to disk to avoid it taking up too much tmp.
|
||||||
(mkIf config.sane.programs.firefox.enabled {
|
persist.byPath."${cfg.browser.cacheDir}".store =
|
||||||
# TODO: move the persistence into the sane.programs API (above)
|
if (cfg.persistData != null) then
|
||||||
# flush the cache to disk to avoid it taking up too much tmp.
|
cfg.persistData
|
||||||
sane.user.persist.byPath."${cfg.browser.cacheDir}".store =
|
else
|
||||||
if (cfg.persistData != null) then
|
"cryptClearOnBoot"
|
||||||
cfg.persistData
|
|
||||||
else
|
|
||||||
"cryptClearOnBoot"
|
|
||||||
;
|
;
|
||||||
|
|
||||||
sane.user.persist.byPath."${cfg.browser.dotDir}/default".store =
|
persist.byPath."${cfg.browser.dotDir}/default".store =
|
||||||
if (cfg.persistData != null) then
|
if (cfg.persistData != null) then
|
||||||
cfg.persistData
|
cfg.persistData
|
||||||
else
|
else
|
||||||
"cryptClearOnBoot"
|
"cryptClearOnBoot"
|
||||||
;
|
;
|
||||||
|
};
|
||||||
|
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user