Skip to content

ClaytonJY/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

My personal dotfile repo. Managed with nix and home-manager.

Bootstrapping a new environment

Use the Determinate Systems Nix Installer to install nix, and git clone this repository

# requires curl & git, e.g.
sudo apt update && sudo apt install -y curl git

curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install

. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh

To start using this configuration, first bootstrap home-manager

mkdir -p ~/.local/state/nix/profiles
nix run home-manager/master -- switch --flake .

then change default shell to fish

# add fish to list of shells
echo $(which fish) | sudo tee -a /etc/shells

# change login shell to fish
chsh -s $(which fish)
# or on some systems (e.g. most VMs)
sudo chsh -s $(which fish) "$USER"

Development

When making changes to the configuration here, apply with

home-manager switch --flake .

N.B.: sometimes we need to update our lockfile

nix flake update

Vagrant

To more easily test this config I've added a Vagrantfile to spin up a VM. Only makes sense for headless stuff.

Start it with vagrant up then log in with vagrant ssh. It'll setup a user, nix, home-manager, etc.

Use vagrant down to turn the VM off, or vagrant destroy to trash it.

Non-Nix

There's a lot of things that seem like they could or should be managed here, but aren't.

Pyenv Build Dependencies

Haven't yet figured out how to include all the pieces needed to pyenv install a new version of python within home.nix.

On a Debian-like system, per the pyenv docs:

sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev

Poetry

Using a nix-managed poetry leads to weird issues with packages like numpy, see this thread.

So instead I pipx install poetry.

Resources

Releases

No releases published

Packages

No packages published

Languages