fixed firefox browser cache stuff

This commit is contained in:
Ingolf Wagner 2023-11-06 11:32:22 +01:00
parent ef0590b774
commit 9eaf97ef0e
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B

View file

@ -104,25 +104,6 @@ let
in in
allBrowser ++ xclipBrowser; allBrowser ++ xclipBrowser;
#createBackupScript = name: home: backupHome:
# pkgs.writeShellScriptBin "${name}-backup" # sh
# ''
# sudo -u ${name} \
# ${tarBin} \
# --exclude=.cache \
# --exclude=.config/chromium/Default/Service\ Worker/CacheStorage \
# --exclude=.config/chromium/Default/IndexedDB \
# --exclude=".mozilla/firefox/[a-zA-Z0-9]+.default/storage" \
# --exclude=Downloads \
# --create \
# --verbos \
# --lzma \
# --file ${home}.tar.lzma \
# --directory ${home} \
# .
# cp ${home}.tar.lzma ${backupHome}.tar.lzma
# '';
createBackupScript = name: home: backupHome: createBackupScript = name: home: backupHome:
createBackupScriptTemplate { createBackupScriptTemplate {
sudo = name; sudo = name;
@ -140,9 +121,10 @@ let
"--exclude=\".config/*chrom*/Default/Service Worker/CacheStorage\"" "--exclude=\".config/*chrom*/Default/Service Worker/CacheStorage\""
"--exclude=\".config/*chrom*/Default/Storage\"" "--exclude=\".config/*chrom*/Default/Storage\""
"--exclude=\".config/*chrom*/Default/optimization_guide_prediction_model_downloads\"" "--exclude=\".config/*chrom*/Default/optimization_guide_prediction_model_downloads\""
"--exclude=\".mozilla/firefox/*.default/*cache*\""
"--exclude=\".mozilla/firefox/*.default/sessionstore-backups\"" "--exclude=\".mozilla/firefox/*.default/sessionstore-backups\""
"--exclude=\".mozilla/firefox/*.default/storage\""
"--exclude=\".mozilla/firefox/*.default/storage-sync-v2.sqlite\"" "--exclude=\".mozilla/firefox/*.default/storage-sync-v2.sqlite\""
"--exclude=\".mozilla/firefox/*.default/storage/to-be-removed\""
]; ];
}; };
@ -162,7 +144,7 @@ let
cp ${source}.tar.lzma ${target}.tar.lzma cp ${source}.tar.lzma ${target}.tar.lzma
''; '';
# todo_this_is_how_I_want_to_use_tar = tar { # todo this_is_how_I_want_to_use_tar = tar {
# sudo = "jobrad"; # sudo = "jobrad";
# # true => tar --directory ${source} . # # true => tar --directory ${source} .
# # false => tar $source # # false => tar $source
@ -182,41 +164,6 @@ let
# }; # };
# }; # };
allExcludes =
let
excludes = {
works = [
"--exclude=Downloads"
"--exclude=.cache"
"--exclude=.config/chromium/Default/IndexedDB"
"--exclude=.config/chromium/Default/Service\ Worker/CacheStorage"
"--exclude=.config/google-chrome/Crash\ Reports"
"--exclude=.config/google-chrome/Default/DawnCache"
"--exclude=.config/google-chrome/Default/Local\ Storage"
"--exclude=.config/google-chrome/Default/Storage"
"--exclude=.config/google-chrome/Default/optimization_guide_prediction_model_downloads"
"--exclude=.mozilla/firefox/*.default/sessionstore-backups"
"--exclude=.mozilla/firefox/*.default/storage"
"--exclude=.mozilla/firefox/*.default/storage-sync-v2.sqlite"
];
};
allScripts = mapAttrs
(name: exclude:
createBackupScriptTemplate {
sudo = "jobrad";
name = name;
source = "/browsers/jobrad";
target = "/browsers/jobrad-${name}";
arguments = exclude;
})
excludes;
in
pkgs.writers.writeBashBin "test-tar"
(concatStringsSep "\n" (builtins.attrValues allScripts));
allBackupScripts = allBackupScripts =
let let
filteredConfigs = filteredConfigs =
@ -362,7 +309,6 @@ in
environment.systemPackages = [ environment.systemPackages = [
browserSelect browserSelect
(desktopFile browserSelect) (desktopFile browserSelect)
# allExcludes
] ]
++ browserExecutableList ++ browserExecutableList
++ (map (bin: desktopFile bin) browserExecutableList) ++ allBackupScripts ++ (map (bin: desktopFile bin) browserExecutableList) ++ allBackupScripts