From b5934c72df8dbb0ccb1c7000ed23b2f4900b0f74 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Sat, 15 Jul 2023 16:23:40 +0900 Subject: [PATCH] Enable missing XDG_ ENVs in fish --- .config/fish/conf.d/plugin-foreign-env.fish | 2 +- .config/fish/config.fish | 2 +- .config/home-manager/home.nix | 7 +++---- home/.bashrc | 1 + home/.zshenv | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.config/fish/conf.d/plugin-foreign-env.fish b/.config/fish/conf.d/plugin-foreign-env.fish index 08ae5da1..98e21dcc 120000 --- a/.config/fish/conf.d/plugin-foreign-env.fish +++ b/.config/fish/conf.d/plugin-foreign-env.fish @@ -1 +1 @@ -/nix/store/s6x9j782anhglyf659bgppz39nvphz6l-home-manager-files/.config/fish/conf.d/plugin-foreign-env.fish \ No newline at end of file +/nix/store/hb2712dvni56s3r2c977rrnbn9icg15g-home-manager-files/.config/fish/conf.d/plugin-foreign-env.fish \ No newline at end of file diff --git a/.config/fish/config.fish b/.config/fish/config.fish index dea280b9..93485b69 120000 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -1 +1 @@ -/nix/store/s6x9j782anhglyf659bgppz39nvphz6l-home-manager-files/.config/fish/config.fish \ No newline at end of file +/nix/store/hb2712dvni56s3r2c977rrnbn9icg15g-home-manager-files/.config/fish/config.fish \ No newline at end of file diff --git a/.config/home-manager/home.nix b/.config/home-manager/home.nix index ee22a740..afcaecf0 100644 --- a/.config/home-manager/home.nix +++ b/.config/home-manager/home.nix @@ -6,10 +6,9 @@ home.username = "kachick"; # TODO: How to cover lima? The default is /home/kachick.local home.homeDirectory = if pkgs.stdenv.hostPlatform.isDarwin then "/Users/${config.home.username}" else "/home/${config.home.username}"; - xdg.configHome = "${config.home.homeDirectory}/.config"; - xdg.cacheHome = "${config.home.homeDirectory}/.cache"; - xdg.stateHome = "${config.home.homeDirectory}/.local/state"; - xdg.dataHome = "${config.home.homeDirectory}/.local/share"; + + # https://github.com/nix-community/home-manager/blob/master/modules/misc/xdg.nix + xdg.enable = true; # This value determines the Home Manager release that your # configuration is compatible with. This helps avoid breakage diff --git a/home/.bashrc b/home/.bashrc index f5deac2e..5c736951 100644 --- a/home/.bashrc +++ b/home/.bashrc @@ -12,6 +12,7 @@ case $- in *) return ;; esac +# Should have home.nix only...? export XDG_CONFIG_HOME="$HOME/.config" export XDG_CACHE_HOME="$HOME/.cache" export XDG_STATE_HOME="$HOME/.local/state" diff --git a/home/.zshenv b/home/.zshenv index 24c3e0e3..ca9c4c9b 100644 --- a/home/.zshenv +++ b/home/.zshenv @@ -5,6 +5,7 @@ # https://qiita.com/vintersnow/items/7343b9bf60ea468a4180 # zmodload zsh/zprof && zprof +# Should have home.nix only...? export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:=$HOME/.config}" # Do NOT manage .zshenv(thisfile) in the dir. export ZDOTDIR="${ZDOTDIR:=$XDG_CONFIG_HOME/zsh}"