camillescott / nixfiles

nix home-manager configuration files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nixfiles

Configuration for using the Nix home-manager utility to manage user programs and configuration files.

Assuming Nix is installed, add necessary channels and install home-manager. We also add the nixGL channel here, which allows for properly functioning openGL applications when the graphical session is not being managed by nix (see the relevant issue).

nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
nix-channel --add https://github.com/guibou/nixGL/archive/main.tar.gz nixgl
nix-channel --update
nix-shell '<home-manager>' -A install

Remove the default configuration:

rm -r ~/.config/nixpkgs

Clone this repo:

git clone git@github.com:camillescott/nixfiles.git

Link it into the expected location:

cd ~/.config
ln -s ~/nixfiles nixpkgs

Link the appropriate entrypoint file (home-linux.nix or home-darwin.nix):

cd ~/nixfiles
ln -s home-linux.nix home.nix

Activate using:

home-manager switch

Useful References

I've been putting this together by learning from a variety of sources. There are a few tutorials:

  1. https://ghedam.at/24353/tutorial-getting-started-with-home-manager-for-nix
  2. https://alexpearce.me/2021/07/managing-dotfiles-with-nix/

As well as the home-manager and Nix documentation and GitHub issues:

About

nix home-manager configuration files


Languages

Language:Vim Script 85.7%Language:Nix 11.0%Language:Shell 3.0%Language:Python 0.3%