Skip to content

Instantly share code, notes, and snippets.

View ashgillman's full-sized avatar
🚲

Ashley Gillman ashgillman

🚲
View GitHub Profile
@ashgillman
ashgillman / .bashrc
Last active February 2, 2018 00:41 — forked from joepie91/.md
Nix in multi-user mode on a non-NixOS (eg. Debian) system
nix-setup-user() {
TARGET_USER="$1"
SYMLINK_PATH="/home/$TARGET_USER/.nix-profile"
PROFILE_DIR="/nix/var/nix/profiles/per-user/$TARGET_USER"
echo "Creating profile $PROFILE_DIR..."
echo "Profile symlink: $SYMLINK_PATH"
rm "$SYMLINK_PATH"
mkdir -p "$PROFILE_DIR"