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.
This commit is contained in:
parent
9f3ae18145
commit
f073b74c13
@ -28,7 +28,7 @@ in
|
|||||||
browser = mkOption {
|
browser = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = concatStringsSep " " [ ''${pkgs.chromium}/bin/chromium''
|
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"''
|
''--proxy-server="socks5://$PROXY"''
|
||||||
''--host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost"''
|
''--host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost"''
|
||||||
''--no-first-run''
|
''--no-first-run''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user