Skip to content

Comment on Home in Nix – dotfile managementparent

Comments

GNU Stow is _great_ for this. I have the following in my dotfiles dir:

    [~/code/dotfiles]$ tree -a -R -L 2
    ├── aws
    │   └── .aws
    ├── git
    │   ├── .gitconfig
    │   └── .gitignore_global
    ├── .gitignore
    ├── .gitmodules
    ├── gpg
    │   └── .gnupg
    ├── README
    ├── ssh
    │   └── .ssh
    ├── tmux
    │   ├── .tmux
    │   └── .tmux.conf
    ├── vim
    │   ├── .viminfo
    │   └── .vimrc
    └── zsh
        ├── .oh-my-zsh
        └── .zshrc
I can then stow any of these into my home dir with:
    $cd ~/code/dotfiles
    $ stow -t $HOME git
That sets up a link from all the files in my home dir like:
    .gitconfig -> code/dotfiles/git/.gitconfig
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.