diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2020-03-11 20:17:46 +0100 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2020-03-11 20:17:46 +0100 |
commit | f073b74c1343b8d3bc93d9f0c5bba5e8bbeabd24 (patch) | |
tree | 405b62c25521b04f70808acea53fee4673446d2d /nixos/modules/programs | |
parent | 9f3ae18145f9c15141542461df51f7715826ad62 (diff) | |
download | nixlib-f073b74c1343b8d3bc93d9f0c5bba5e8bbeabd24.tar nixlib-f073b74c1343b8d3bc93d9f0c5bba5e8bbeabd24.tar.gz nixlib-f073b74c1343b8d3bc93d9f0c5bba5e8bbeabd24.tar.bz2 nixlib-f073b74c1343b8d3bc93d9f0c5bba5e8bbeabd24.tar.lz nixlib-f073b74c1343b8d3bc93d9f0c5bba5e8bbeabd24.tar.xz nixlib-f073b74c1343b8d3bc93d9f0c5bba5e8bbeabd24.tar.zst nixlib-f073b74c1343b8d3bc93d9f0c5bba5e8bbeabd24.zip |
nixos/captive-browser: set chromium's data-dir to a XDG-compliant location
To quote the XDG specification: There is a single base directory relative to which user-specific data files should be written. This directory is defined by the\ environment variable $XDG_DATA_HOME. Rather than adding another directory to $HOME, I think that it's better to follow this standard to avoid a cluttered home-dir.
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r-- | nixos/modules/programs/captive-browser.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/programs/captive-browser.nix b/nixos/modules/programs/captive-browser.nix index 55d474e5c9db..26db16750727 100644 --- a/nixos/modules/programs/captive-browser.nix +++ b/nixos/modules/programs/captive-browser.nix @@ -28,7 +28,7 @@ in browser = mkOption { type = types.str; default = concatStringsSep " " [ ''${pkgs.chromium}/bin/chromium'' - ''--user-data-dir=$HOME/.chromium-captive'' + ''--user-data-dir=''${XDG_DATA_HOME:-$HOME/.local/share}/chromium-captive'' ''--proxy-server="socks5://$PROXY"'' ''--host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost"'' ''--no-first-run'' |