Configuration which I use for my daily development purposes.
- Installation and building is fully managed by
nix. - Powered by jandamm/zgenom plugin manager (see
zsh/.zshrcfor all used plugins) lightweightzshshell. - subnixr/minimal theme.
- rupa/z to jump around most used directories (mapped to
jcommand). - Automatically starts
tmuxusing predefinedtmuxinatorconfig. - Automatically inits
gpgandssh-agentsessions. - Store sensitive settings under untracked
zsh/machine-based.zshfile. - Comes with many development utils, like exa, rg, jq, yq, ouch (see
home.nixfor complete list). - nix-community/comma to run software without installation (like
, treeto download and runtree). - Customized AstroNvim community distribution.
Some overview is also available in my article ⚙️ Managing dotfiles with Nix.
To try this configuration, you can either start it in Docker container or using nix develop shell:
Docker
nix build github:seroperson/dotfiles#docker
docker load < ./result
docker run --rm -it seroperson.me/dotfilesnix develop
You'll also need to redefine your HOME and USER environment variables:
mkdir -p /tmp/test
USER=seroperson-preview HOME=/tmp/test nix develop --impure github:seroperson/dotfilesInitially, only nix and git must be installed. Be sure that nix is up-to-date:
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --updateClone the repository:
git clone https://github.com/seroperson/dotfiles $HOME/.dotfiles/And then let the home-manager do the rest:
home-manager init --switch $HOME/.dotfiles/ --flake $HOME/.dotfiles/or using nix, if home-manager is unavailable:
export NIX_CONFIG="extra-experimental-features = nix-command flakes"
nix run github:nix-community/home-manager -- init --switch $HOME/.dotfiles/ --flake $HOME/.dotfiles/Next, you should do chsh $USER -s $HOME/.nix-profile/bin/zsh and re-login.
Finally, be sure to install Nerd Font and Catpuccin theme (mocha variant) for your terminal.
In order to update installed packages, use the following commands:
nix-channel --update
nix-env -u --always
nix flake updateAnd then re-init home-manager with command from section above.
Usually nix doesn't work as expected and you don't know what to do. It is good idea to start your troubleshooting with global cleanup:
nix-channel --update
nix-env -u --always
rm /nix/var/nix/gcroots/auto/*
rm -rf $HOME/.cache/nix
nix-collect-garbage -dAlso it's possible to debug nix variables using nix repl. For example, to
load flake into repl, you can do the following:
nix repl
nix-repl> :lf ./
nix-repl> builtins.attrNames homeConfigurations.seropersonnix is not easy thing to get started with, but luckily it has a lot of guides available across the web.
Here are some of them:
