Skip to content

seroperson/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚙️ seroperson's dotfiles

Configuration which I use for my daily development purposes.

✨ Features

  • Installation and building is fully managed by nix.
  • Powered by jandamm/zgenom plugin manager (see zsh/.zshrc for all used plugins) lightweight zsh shell.
  • subnixr/minimal theme.
  • rupa/z to jump around most used directories (mapped to j command).
  • Automatically starts tmux using predefined tmuxinator config.
  • Automatically inits gpg and ssh-agent sessions.
  • Store sensitive settings under untracked zsh/machine-based.zsh file.
  • Comes with many development utils, like exa, rg, jq, yq, ouch (see home.nix for complete list).
  • nix-community/comma to run software without installation (like , tree to download and run tree).
  • Customized AstroNvim community distribution.

Some overview is also available in my article ⚙️ Managing dotfiles with Nix.

📲 Preview without installation

Preview using docker

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/dotfiles
nix 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/dotfiles

🚀 Installation

Initially, 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 --update

Clone 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.

📦 Update packages

In order to update installed packages, use the following commands:

nix-channel --update
nix-env -u --always
nix flake update

And then re-init home-manager with command from section above.

🚦 Troubleshooting

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 -d

Also 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.seroperson

📂 Nix Guides

nix 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:

About

My nix-powered dotfiles

Topics

Resources

License

Stars

Watchers

Forks