about summary refs log tree commit diff
path: root/configs/shared/.profile
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-01-29T12·38+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-01-29T14·21+0000
commit093b566e711c9484d4dd8c32e076a525895998ad (patch)
treeae0fbf91f104b7fc94fa91afa6edddd4fc232d9d /configs/shared/.profile
parentd28690d8146cd6dd5377f1c1df5724caf6f89315 (diff)
Support env vars for {DESK,LAP,CLOUD}TOP devices
I recently changed my hostname for my desktop and laptop from

wpcarro.lon.corp.google.com -> zeno.lon.corp.google.com
wpcarro2                    -> seneca

If you're curious, the names Zeno and Seneca come from famous Stoic
philosophers. As you can see from this commit, my configuration depends on the
values of these hostnames.

Immediately impacted:
- .profile
- device.el

Not immediately impacted:
- configs/install
- configs/uninstall
- .ssh/config
- .zshrc*

* As a side note, I should stop supporting ZSH.

Using an .envrc file helps me DRY up some of my configuration. Ideally I should
only need to make changes to the .envrc file and then expect everything to work
as expected. Let's see how that goes.
Diffstat (limited to 'configs/shared/.profile')
-rw-r--r--configs/shared/.profile16
1 files changed, 5 insertions, 11 deletions
diff --git a/configs/shared/.profile b/configs/shared/.profile
index c53a0164d438..6513c2c9b5c0 100644
--- a/configs/shared/.profile
+++ b/configs/shared/.profile
@@ -51,16 +51,10 @@ export XSECURELOCK_NO_COMPOSITE=1
 LOCALE_ARCHIVE=$(readlink ~/.nix-profile/lib/locale)/locale-archive
 export LOCALE_ARCHIVE
 
-# Set environment variables for Nix
-# Don't run this for systems running NixOS
+# Set environment variables for Nix. Don't run this for systems running NixOS.
+# TODO: Learn why I can't use the variables from ~/dotfiles/.envrc.
 case $(hostname) in
-  # desktop
-  wpcarro.lon.corp.google.com)
-    . ~/.nix-profile/etc/profile.d/nix.sh;;
-  # cloudtop
-  wpcarro.c.googlers.com)
-    . ~/.nix-profile/etc/profile.d/nix.sh;;
-  # work_laptop
-  wpcarro2)
-    . ~/.nix-profile/etc/profile.d/nix.sh;;
+  zeno.lon.corp.google.com) . ~/.nix-profile/etc/profile.d/nix.sh;;
+  seneca) . ~/.nix-profile/etc/profile.d/nix.sh;;
+  wpcarro.c.googlers.com) . ~/.nix-profile/etc/profile.d/nix.sh;;
 esac