Skip to content

Commit

Permalink
nixos/captive-browser: set chromium's data-dir to a XDG-compliant loc…
Browse files Browse the repository at this point in the history
…ation

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.
  • Loading branch information
Ma27 committed Mar 11, 2020
1 parent 9f3ae18 commit f073b74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/programs/captive-browser.nix
Expand Up @@ -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''
Expand Down

0 comments on commit f073b74

Please sign in to comment.