summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2022-10-15 08:25:49 +0200
committerAlan Pearce2022-10-15 08:25:49 +0200
commit52f27f4d55820b2ad4d2d8df09d597e8ba643d81 (patch)
treede6b7fd12e60b24e1929716725afd1dcde69e79f
parent6e34ca8bda9cddcce1ea73f73b883a3ec8358678 (diff)
downloadnixfiles-52f27f4d55820b2ad4d2d8df09d597e8ba643d81.tar.lz
nixfiles-52f27f4d55820b2ad4d2d8df09d597e8ba643d81.tar.zst
nixfiles-52f27f4d55820b2ad4d2d8df09d597e8ba643d81.zip
Fix XDG environment variables
-rw-r--r--user/settings/base.nix96
1 files changed, 46 insertions, 50 deletions
diff --git a/user/settings/base.nix b/user/settings/base.nix
index 252d113f..74c759bb 100644
--- a/user/settings/base.nix
+++ b/user/settings/base.nix
@@ -35,57 +35,53 @@
       };
     };
   };
-  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
+    [
+      file
+      ldns
+      lsof
+      unar
+      zip
+    ]
+    else
     [
-      pv
-      fd
-      sd
-      entr
-      ripgrep
-      iftop
-      nmap
-      moreutils
-      mtr
-      tree
-      abduco
-      dvtm
-      vimv
-    ] ++
-    (
-      if !stdenv.isDarwin
-      then
-      [
-        file
-        ldns
-        lsof
-        unar
-        zip
-      ]
-      else
-      [
-      ]
-    );
+    ]
+  );
 }