Earlier quoted context omitted.
I am not an expert in Ansible, or any other software of the kind, but I think this is one of the easier use-cases of such a program. I wrote an ansible script to compile emacs from source, after some initial configuration, and it serves me pretty well.
I started with Ansible for automation, and still use it, but have abandoned it for setting up my personal environment. I still use it to set up services, such as sshd, webserver, printer, samba, smartd etc. I found it was more cumbersome for personal environment setup than my script method. My method of re-initializing my environment rests on three pillars: Ansible, for server/OS setup. Things run by init/systemd, in…
Using GNU Stow to manage your dotfiles (2012)
21–30 of 116 posts
Re: Using GNU Stow to manage your dotfiles (2012)
#22I am sure there is a better way but I just do this. It works well enough for my purposes. cd ~ git init git remote add origin [URL] git fetch git checkout -f master
git clone --bare ~/.dotfiles
git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME checkout
git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME config --local status.showUntrackedFiles no
And then I add an alias: alias cfg='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
Now I can just manage my dotfiles as a git repo, and I don't have to worry about accidentally adding local secrets to the repo.Re: Using GNU Stow to manage your dotfiles (2012)
#23I am sure there is a better way but I just do this. It works well enough for my purposes. cd ~ git init git remote add origin [URL] git fetch git checkout -f master
Re: Using GNU Stow to manage your dotfiles (2012)
#24I am sure there is a better way but I just do this. It works well enough for my purposes. cd ~ git init git remote add origin [URL] git fetch git checkout -f master
Re: Using GNU Stow to manage your dotfiles (2012)
#25I love stow. My only complaint is that I cannot seem to remember the name of the command: Is it "grab", "collect", "pirate", "organize", "install", "push", "pull", ...? So I added a note to myself into my .bashrc about this command, and patted myself on the back. The next time I reinstalled Linux, I couldn't remember the name, but I remembered that I wrote a note to myself about it. So opened up my .bashrc, and... I…
Re: Using GNU Stow to manage your dotfiles (2012)
#26I’ve been using stow to manage my dotfiles for a long time, works very well. Recently I’ve moved to NixOS and have been considering trying out Nix’s home-manager (mostly just out of curiosity - I’m perfectly happy with stow). If anyone has tried both stow and home-manager, I’d be interested to know your thoughts on how they compare.
I'm not sure if it's all worth it. I recently got a new machine, and it sure reduced the pain of setting it up. But I get a new laptop every four years or so. Bike shedding is fun.
Re: Using GNU Stow to manage your dotfiles (2012)
#27I am sure there is a better way but I just do this. It works well enough for my purposes. cd ~ git init git remote add origin [URL] git fetch git checkout -f master
Yeah, that's what I do. And I have an ever-growing .gitignore file with all the dot files and things I don't care about like ~/Downloads...
Re: Using GNU Stow to manage your dotfiles (2012)
#28I am sure there is a better way but I just do this. It works well enough for my purposes. cd ~ git init git remote add origin [URL] git fetch git checkout -f master
Recommend you also add "*" to your $HOME/.gitignore in this setup. Then you simply need to use `git add -f` to force-add files to your dotfiles store, so that you don't accidentally add files you don't intend to keep there.
Re: Using GNU Stow to manage your dotfiles (2012)
#29If you wanted to you could && a few symlinks and other commands into 1 copy / paste'able command to get up and running really quickly. It's also painless to manage secrets by sourcing in optional files. It also works nicely when you want files living across 2 systems (such as WSL 2 and Windows) where on a Windows box you consider certain Windows files dotfiles even though technically they exist elsewhere.
I've been managing my dotfiles like this for a few years and it seems to be working out well not just for myself but others who have want to use them either partially or in full. I open sourced them here: https://github.com/nickjj/dotfiles
I purposely broke up some of the commands because I know that not everyone will want a 100% replica of my dotfiles. Folks copy / paste only the commands they want.
Re: Using GNU Stow to manage your dotfiles (2012)
#30`yay -Qe | cut -f 1 -d " " > .config/packages.txt` to back up my packages (without version), push to remote, and then `cd ~ && yadm clone -f && yay -S $(cat .config/packages.txt)` to reinstall everything. Piece of cake.
The only thing I am missing is tracking system files, like /etc/pacman.conf, and it looks like there's a way to do it with yadm, but it looks a bit clunky and I haven't tried.
[0] https://yadm.io/