all repos — nixfiles @ 52f27f4d55820b2ad4d2d8df09d597e8ba643d81

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

Fix XDG environment variables
Alan Pearce alan@alanpearce.eu
Sat, 15 Oct 2022 08:25:49 +0200
commit

52f27f4d55820b2ad4d2d8df09d597e8ba643d81

parent

6e34ca8bda9cddcce1ea73f73b883a3ec8358678

1 files changed, 46 insertions(+), 50 deletions(-)

jump to
M user/settings/base.nixuser/settings/base.nix
@@ -35,57 +35,53 @@ "suggest.enablePreview" = true;       };
     };
   };
-  home.sessionVariables =
-    let
-      HOME = builtins.getEnv "HOME";
-    in
-    {
-      EMAIL = "alan@alanpearce.eu";
-      XDG_CACHE_HOME = if pkgs.stdenv.isDarwin then "${HOME}/Library/Caches/XDG" else "${HOME}/.cache";
-      XDG_CONFIG_HOME = "${HOME}/.config";
-      XDG_DATA_HOME = "${HOME}/.local/share";
-    };
+  home.sessionVariables = {
+    EMAIL = "alan@alanpearce.eu";
+    XDG_CACHE_HOME = if pkgs.stdenv.isDarwin then "$HOME/Library/Caches/XDG" else "$HOME/.cache";
+    XDG_CONFIG_HOME = "$HOME/.config";
+    XDG_DATA_HOME = "$HOME/.local/share";
+  };
 
-    programs.zsh.shellAliases = {
-      make = "${pkgs.remake}/bin/remake";
-    };
-    programs.htop = {
-      enable = true;
-      settings = {
-        header_margin = 0;
-        tree_view = 1;
-        hide_kernel_threads = 1;
-        hide_userland_threads = 1;
-      };
+  programs.zsh.shellAliases = {
+    make = "${pkgs.remake}/bin/remake";
+  };
+  programs.htop = {
+    enable = true;
+    settings = {
+      header_margin = 0;
+      tree_view = 1;
+      hide_kernel_threads = 1;
+      hide_userland_threads = 1;
     };
-    home.packages = with pkgs;
+  };
+  home.packages = with pkgs;
+  [
+    pv
+    fd
+    sd
+    entr
+    ripgrep
+    iftop
+    nmap
+    moreutils
+    mtr
+    tree
+    abduco
+    dvtm
+    vimv
+  ] ++
+  (
+    if !stdenv.isDarwin
+    then
     [
-      pv
-      fd
-      sd
-      entr
-      ripgrep
-      iftop
-      nmap
-      moreutils
-      mtr
-      tree
-      abduco
-      dvtm
-      vimv
-    ] ++
-    (
-      if !stdenv.isDarwin
-      then
-      [
-        file
-        ldns
-        lsof
-        unar
-        zip
-      ]
-      else
-      [
-      ]
-    );
+      file
+      ldns
+      lsof
+      unar
+      zip
+    ]
+    else
+    [
+    ]
+  );
 }