diff options
author | tv <tv@krebsco.de> | 2021-01-24 01:24:19 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2021-01-25 11:29:15 +0100 |
commit | c2cc856add783c59f910980da7a5d796639dea4c (patch) | |
tree | 81d1344a9b7d0e8166b6ee075d6539e84c499109 /tv | |
parent | e43e1a8e1c3cd4b16d9ddd22696cd8a64f077a60 (diff) |
tv cr: use XDG_RUNTIME_DIR
Diffstat (limited to 'tv')
-rw-r--r-- | tv/5pkgs/default.nix | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tv/5pkgs/default.nix b/tv/5pkgs/default.nix index fd3d2f3..cae5da1 100644 --- a/tv/5pkgs/default.nix +++ b/tv/5pkgs/default.nix @@ -13,13 +13,17 @@ foldl' mergeAttrs {} // { - # TODO use XDG_RUNTIME_DIR? cr = self.writeDashBin "cr" '' set -efu + if test -n "''${XDG_RUNTIME_DIR-}"; then + cache_dir=$XDG_RUNTIME_DIR/chromium-disk-cache + else + cache_dir=/tmp/chromium-disk-cache_$LOGNAME + fi export LC_TIME=de_DE.utf8 exec ${self.chromium}/bin/chromium \ --ssl-version-min=tls1 \ - --disk-cache-dir=/tmp/chromium-disk-cache_"$LOGNAME" \ + --disk-cache-dir="$cache_dir" \ --disk-cache-size=50000000 \ "$@" ''; |