From 5e89baa6c40ad420560f0a82fb1eb822ce9af092 Mon Sep 17 00:00:00 2001 From: cswimr Date: Sun, 2 Feb 2025 06:38:42 -0600 Subject: [PATCH] add more xdg env vars --- nixos/environment.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/nixos/environment.nix b/nixos/environment.nix index 473ea29..c82d6de 100644 --- a/nixos/environment.nix +++ b/nixos/environment.nix @@ -1,18 +1,26 @@ { lib, ... }: { - environment.variables = { - PATH = "$PATH:/etc/nixos/scripts"; + environment.variables = rec { EDITOR = "nvim"; VISUAL = "code"; # XDG settings - XDG_CONFIG_HOME = lib.mkDefault "$HOME/.config"; + XDG_CACHE_HOME = "$HOME/.cache"; + XDG_CONFIG_HOME = "$HOME/.config"; + XDG_DATA_HOME = "$HOME/.local/share"; + XDG_STATE_HOME = "$HOME/.local/state"; + XDG_BIN_HOME = "$HOME/.local/bin"; # less settings LESS = "-R"; # Fix unicode characters not being displayed properly in less or cat (bat) # https://github.com/sharkdp/bat/issues/2578#issuecomment-1598332705 LESSUTFCHARDEF = "E000-F8FF:p,F0000-FFFFD:p,100000-10FFFD:p"; + + PATH = [ + "${XDG_BIN_HOME}" + "/etc/nixos/scripts" + ]; }; environment.sessionVariables = {