diff options
Diffstat (limited to 'user/settings/base.nix')
-rw-r--r-- | user/settings/base.nix | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/user/settings/base.nix b/user/settings/base.nix index eac06748..a3a67593 100644 --- a/user/settings/base.nix +++ b/user/settings/base.nix @@ -12,10 +12,29 @@ manual = { html.enable = true; }; - home.sessionVariables = { - EMAIL = "alan@alanpearce.eu"; - MANPAGER = "bat -l man -p"; - }; + home.sessionVariables = + let + conf = config.xdg.configHome; + data = config.xdg.dataHome; + cache = config.xdg.cacheHome; + state = config.xdg.stateHome; + in + { + EMAIL = "alan@alanpearce.eu"; + MANPAGER = "bat -l man -p"; + ABDUCO_SOCKET_DIR = "${state}/abduco"; + GNUPGHOME = "${data}/gnupg"; + SOLARGRAPH_CACHE = "${cache}/solargraph"; + ASPELL_CONF = "per-conf ${conf}/aspell/aspell.conf; personal ${conf}/aspell/en.pws; repl ${conf}/aspell/en.prepl"; + ELECTRUMDIR = "${data}/electrum"; + DOCKER_CONFIG = "${conf}/docker"; + npm_config_userconfig = "${conf}/npm/config"; + PASSWORD_STORE_HOME = "${data}/password-store"; + WGETRC = pkgs.writeText "wgetrc" '' + hsts-file = ${cache}/wget-hsts + ''; + SQLITE_HISTORY = "${data}/sqlite_history"; + }; xdg = { enable = true; cacheHome = @@ -24,7 +43,10 @@ else "${config.home.homeDirectory}/.cache"; configHome = "${config.home.homeDirectory}/.config"; dataHome = "${config.home.homeDirectory}/.local/share"; - stateHome = "${config.home.homeDirectory}/.local/state"; + stateHome = + if pkgs.stdenv.isDarwin + then "${config.home.homeDirectory}/Library/Caches/TemporaryItems/State" + else "${config.home.homeDirectory}/.local/state"; }; home.shellAliases = { |