about summary refs log tree commit diff
path: root/.envrc
AgeCommit message (Collapse)AuthorFilesLines
2020-07-02 Clear $NIX_PATHWilliam Carroll1-1/+5
Ensure that $NIX_PATH is empty using a .envrc file. nix.dev considers references to <nixpkgs>, <briefcase>, <depot>, <unstable> to be an anti-pattern because it hinders reproducibility by introducing an implicit environment. This repository is chock-full of references to <{nixpkgs,unstable,briefcase,depot}>, so right now everything is broken.
2020-03-28 Add <unstable> to NIX_PATHWilliam Carroll1-1/+1
1. I should be using NixOS/nixpkgs-channels instead of NixOS/nixpkgs 2. Instead of refactoring everything, I'm supporting <unstable> and pointing it to NixOS/nixpkgs-channels I needed <unstable> to get a more recent version of the Data.Time Haskell package.
2020-03-27 Drop support for lorriWilliam Carroll1-1/+6
Lorri does not cleanly integrate with my corporate device, which cannot run NixOS. To expose dependencies to Emacs buffers, I will use nix-buffer.el, which reads its values from dir-locals.nix. To easily expose dependencies from my existing shell.nix files into dir-locals.nix, I wrote a Nix utility function.
2020-02-07 Support lorriWilliam Carroll1-7/+1
From what I currently understand, lorri is a tool (sponsored by Target) that uses nix and direnv to build and switch between environments quickly and easily. When you run `lorri init` inside of a directory, lorri creates a shell.nix and an .envrc file. The .envrc file calls `eval "$(lorri direnv)"` and the shell.nix calls `<nixpkgs>.mkShell`, which creates a shell environment exposing dependencies on $PATH and environment variables. lorri uses direnv to ensure that $PATH and the environment variables are available depending on your CWD. lorri becomes especially powerful because of Emacs's `direnv-mode`, which ensures that Emacs buffers can access anything exposed by direnv as well. I still need to learn more about how lorri works and how it will affect my workflow, but I'm enjoying what I've seen thus far, and I'm optimistic about the road ahead.
2020-01-31 Rename dotfiles -> briefcaseWilliam Carroll1-2/+4
Renaming my mono-repo briefcase. I first introduced this commit in master, but it introduced a bug where one of two things would happen: 1. Emacs wouldn't start and would crash X. 2. Emacs would start but my keyboard wouldn't work. I learned some valuable debugging skills in the process. Here are some of them: When my keyboard was broken, I wanted to control my computer using my laptop. Thankfully this is possible by using `x2x`, which forward X events from the SSH client to the SSH host. ```shell > # I'm unsure if this is the *exact* command > ssh -X desktop x2x -west :0.0 ``` Git commit-local bisecting. I didn't need to do a `git bisect` because I knew which commit introduced the bug; it was HEAD, master. But -- as you can see from the size of this commit -- there are many changes involved. I wanted to binary search through the changes, so I did the following workflow using `magit`: - git reset --soft HEAD^ - git stash 1/2 of the files changed - re-run `nix-env -f ~/briefcase/emacs -i` - restart X session - If the problem persists, the bug exists in the non-stashed files. Repeat the process until you find the bug. In my case, the bug was pretty benign. Calling `(exwm/switch "Dotfiles")` at the bottom of `window-manager.el` was failing because "Dotfiles" is the name of a non-existent workspace; it should've been `(exwm/switch "Briefcase")`. There may have been more problems. I changed a few other things along the way, including exposing the env vars BRIEFCASE to `wpcarros-emacs` inside of `emacs/default.nix`. The important part is that this was a valuable learning opportunity, and I'm glad that I'm walking away from the two days of "lost productivity" feeling actually productive.
2020-01-31 Point <nixpkgs> to ~/nixpkgsWilliam Carroll1-1/+1
At the moment, all of the Nix repositories that I'm consuming exist in ~. To keep things consistent, I ran: ```shell > hub clone nixos/nixpkgs ~/nixpkgs ```
2020-01-29 Support env vars for {DESK,LAP,CLOUD}TOP devicesWilliam Carroll1-0/+3
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.
2020-01-27 Rename mono -> universeWilliam Carroll1-1/+1
Update code that depends on my mono-repo being named "mono". I've renamed it to "universe", which explains the changes in this commit. TODO: Merge dotfiles into universe.
2020-01-23 Add NIX_PATH to envrcWilliam Carroll1-0/+1
This way functions like `nix/sly-from-universe` can resolve nix paths like `<depot>` and `<universe>`.
2020-01-22 Drop support for ORG_DIRECTORY in envrcWilliam Carroll1-1/+0
When Emacs starts it's called from xsessionrc.shared, which is called outside of direnv's .envrc scope. Because of this variables defined therein, like ORG_DIRECTORY, are undefined and prevent Emacs from initializing. I'm hard-coding the `org-directory` variable for now and removing references to `(getenv "ORG_DIRECTORY")`.
2020-01-17 Prefer direnv to manage ORG_DIRECTORYWilliam Carroll1-0/+1
Instead of keeping this in my ~/.profile, I'm going to define it in .envrc. What I still don't know is how functions like `getenv` are supposed to interact with direnv. I suppose maybe they aren't? Right now, when I call `(getenv "DOTFILES")` from Emacs, it's `nil`, which I understand. Hopefully the more I use direnv, the more reasonable expectations I'll have.
2020-01-17 Support direnvWilliam Carroll1-0/+1
DRY up environment variable definition by using direnv and an .envrc file.