Start lorri daemon in ~/.profile

This does two things:
1. Starts lorri daemon
2. Moves ssh-agent and docker daemon startup calls to ~/.profile

I'm still not entirely sure when ~/.profile is evaluated... I'd like to use
systemd to startup and manage these background services, but I currently don't
have a strong enough desire to do this.
This commit is contained in:
William Carroll 2020-02-06 22:21:15 +00:00
parent 185fa0dda5
commit c15a393112
2 changed files with 16 additions and 16 deletions

View file

@ -3,6 +3,7 @@
# everytime a new shell is created. The ~/.profile, on the other hand, is
# typically sourced only once at login.
# TODO: Consider getting rid of all of these variables and prefer using lorri.
PATH+=":$HOME/bin" # personal
PATH+=":$HOME/.local/bin" # personal
PATH+=":$HOME/.cargo/bin" # Rust
@ -20,19 +21,13 @@ fi
# Application preferences
export BROWSER=google-chrome-stable
export TERMINAL=alacritty # temporary; change this back to `st`
export TERMINAL=alacritty
export VISUAL=emacsclient
export EDITOR=emacsclient
export ALTERNATE_EDITOR=nvim
# Rust integration. Keep here so programs like Emacs can read this value.
RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
export RUST_SRC_PATH
# TODO: Decide if clipmenu is compatible with EXWM.
# Ensure clipmenu uses rofi instead of dmenu
# TODO: Remove this after fully supporting Emacs client for clipmenu.
export CM_LAUNCHER=rofi
export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
# Application configuration
export FZF_DEFAULT_COMMAND='fd --hidden --follow --exclude ".git"'
@ -48,8 +43,13 @@ export XSECURELOCK_NO_COMPOSITE=1
# This fixes nixpkgs that rely on glibc-2.27, which allegedly breaks locale
# issues.
# See this thread for more details: https://github.com/NixOS/nixpkgs/issues/8398
LOCALE_ARCHIVE=$(readlink ~/.nix-profile/lib/locale)/locale-archive
export LOCALE_ARCHIVE
export LOCALE_ARCHIVE="$(readlink ~/.nix-profile/lib/locale)/locale-archive"
# Start ssh-agent
eval "$(ssh-agent -s)"
# TODO: Prefer `systemctl start docker.service`
dockerd &
# Set environment variables for Nix. Don't run this for systems running NixOS.
# TODO: Learn why I can't use the variables from ~/briefcase/.envrc.
@ -58,3 +58,8 @@ case $(hostname) in
seneca) . ~/.nix-profile/etc/profile.d/nix.sh;;
wpcarro.c.googlers.com) . ~/.nix-profile/etc/profile.d/nix.sh;;
esac
# NOTE: `lorri` needs to be below the calls to source Nix environment since it's
# installed with `nix-env -iA nixpkgs.lorri`.
# Start lorri daemon
lorri daemon &

View file

@ -1,4 +1,5 @@
#!/bin/sh
# Might be unnecessary...
. ~/.profile
@ -10,12 +11,6 @@ xsetroot -solid "#333333"
# Set fallback cursor.
xsetroot -cursor_name left_ptr
# Start ssh-agent
eval "$(ssh-agent -s)"
# TODO: Prefer `systemctl start docker.service`
dockerd &
# start compton for shadows, transparency, fading, etc.
# TODO: Consider starting this with `systemctl --user enable compton.service`
compton &