summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
authorAlan Pearce2019-10-13 12:40:58 +0200
committerAlan Pearce2019-10-16 19:27:33 +0200
commita7703b258aa3c8d30543a7de41ac12f827bd845a (patch)
tree7ce92dc922b074689d053a1e1ad438e0f793947c /user
parentbbe5d54a343420183f7a2202a1df000a95a53fd1 (diff)
downloadnixfiles-a7703b258aa3c8d30543a7de41ac12f827bd845a.tar.lz
nixfiles-a7703b258aa3c8d30543a7de41ac12f827bd845a.tar.zst
nixfiles-a7703b258aa3c8d30543a7de41ac12f827bd845a.zip
Choose EMAIL via home-manager
Diffstat (limited to 'user')
-rw-r--r--user/satoshipad.nix2
-rw-r--r--user/settings/base.nix3
-rw-r--r--user/settings/zsh.nix30
3 files changed, 4 insertions, 31 deletions
diff --git a/user/satoshipad.nix b/user/satoshipad.nix
index 738a5325..4af9e46f 100644
--- a/user/satoshipad.nix
+++ b/user/satoshipad.nix
@@ -24,6 +24,8 @@
     ./settings/zsh.nix
   ];
 
+  home.sessionVariables.EMAIL = "alan@satoshipay.io";
+
   xsession.windowManager.i3 = {
     config = {
       assigns = {
diff --git a/user/settings/base.nix b/user/settings/base.nix
index cc83cb47..c78fdc44 100644
--- a/user/settings/base.nix
+++ b/user/settings/base.nix
@@ -1,4 +1,4 @@
-{ config, pkgs, ... }:
+{ config, lib, pkgs, ... }:
 
 {
   # Let Home Manager install and manage itself.
@@ -6,6 +6,7 @@
   manual = {
     html.enable = true;
   };
+  home.sessionVariables.EMAIL = lib.mkDefault "alan@alanpearce.eu";
   home.packages = with pkgs; [
     pv
     fd
diff --git a/user/settings/zsh.nix b/user/settings/zsh.nix
index dd24b663..eb606fc9 100644
--- a/user/settings/zsh.nix
+++ b/user/settings/zsh.nix
@@ -258,29 +258,6 @@ in
     };
 
     envExtra = ''
-      case $OSTYPE in
-        darwin*)
-          os=darwin
-          ;;
-        linux-gnu)
-          os=linux
-          ;;
-        freebsd*)
-          os=freebsd
-          ;;
-        *)
-          os=unknown
-          ;;
-      esac
-
-      case $MACHTYPE in
-        *64)
-          arch=amd64
-          ;;
-        *)
-          arch=386
-          ;;
-      esac
       if [[ ''${path[(I)$HOME/.local/bin ]} ]]
       then
         path+=($HOME/.local/bin)
@@ -290,13 +267,6 @@ in
       then
         path+=($HOME/go/bin)
       fi
-
-      if [[ $HOST =~ satoshi ]]
-      then
-        EMAIL=alan@satoshipay.io
-      else
-        EMAIL=alan@alanpearce.eu
-      fi
     '';
 
     initExtra = ''