all repos — nixfiles @ cb6c1b4d42c5170ee0d4ac61a75c674777c86b53

System and user configuration, managed by nix and home-manager

use XDG directories in script
Alan Pearce alan@alanpearce.eu
Sun, 12 May 2024 12:44:42 +0200
commit

cb6c1b4d42c5170ee0d4ac61a75c674777c86b53

parent

e204add2f6900d93a1d3ba6536f371c619eae614

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M bin/home-managerbin/home-manager
@@ -5,7 +5,9 @@ echo "error: no HOME"     exit 1
 end
 
-set --function channel_root $HOME/.nix-defexpr/channels
+set --query XDG_STATE_HOME || set --function XDG_STATE_HOME $HOME/.local/state
+set --function nix_state_home $XDG_STATE_HOME/nix
+set --function channel_root $nix_state_home/channels
 set --function user_nixpkgs $HOME/.config/nixpkgs
 set --function nixfiles (path resolve (status dirname)/..)