So what I do on any new system is just:
git clone https://github.com/susam/dotfiles.git
cd dotfiles
./setup
And if I want to undo all the setup for some reason: ./setup rm81–90 of 116 posts
So what I do on any new system is just:
git clone https://github.com/susam/dotfiles.git
cd dotfiles
./setup
And if I want to undo all the setup for some reason: ./setup rmEarlier quoted context omitted.
> My method is to write small scripts, I call them setuplets, Finally I have a proper term for what I, too, have been doing all these years! :-) It's indeed the best-possible approach I've found, though there are a number of things that I haven't yet solved for myself in a satisfactory manner: - With shell scripts there are no idempotency guarantees and there is no easy undoing / uninstalling / clean-up, especially a…
Have you played with NixOS or Guix at all? They attempt to solve this problem from the ground up for the entire OS. It obviously has trade offs, but IMO it is the best solution around today (other than Kubernetes, but that is an abstraction level higher).
Call me old fashioned but what's wrong with having a regular git repo anywhere you want with all of your dotfiles and them symlink those files to where they need to go? If 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…
> but what's wrong with having a regular git repo anywhere you want with all of your dotfiles and them symlink those files to where they need to go? Nothing wrong with tracking dotfiles with Git. It's probably the simplest and easiest approach without requiring any fancy tools other than Git. However, as mentioned in ArchLinux's wiki page, the disadvantage of Git approach is that "host-specific configuration generall…
EDIT: 12+ years at work.
Call me old fashioned but what's wrong with having a regular git repo anywhere you want with all of your dotfiles and them symlink those files to where they need to go? If 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…
> Call me old fashioned but what's wrong with having a regular git repo anywhere you want with all of your dotfiles and them symlink those files to where they need to go? I prefer to skip the symlinks, and just directly use the git repository as my home directory. (I have a sizable .gitignore for things I don't want to track.)
Call me old fashioned but what's wrong with having a regular git repo anywhere you want with all of your dotfiles and them symlink those files to where they need to go? If 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…
Exactly! I do exactly that. I have an install.sh script that simply iterates over the files and directories in my dotfiles repo and does mkdir and ln
Earlier quoted context omitted.
Interesting! https://github.com/nix-community/home-manager uses Nix to solve this problem. It adds reproducibility and rollbacks but with the cost of learning the Nix DSL.
+1 for nix and home-manager - I recently switched to this setup (still learning/experimenting a lot, link here [0]) and have been very happy! [0]: https://github.com/jpetrucciani/nix
Call me old fashioned but what's wrong with having a regular git repo anywhere you want with all of your dotfiles and them symlink those files to where they need to go? If 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…
> Call me old fashioned but what's wrong with having a regular git repo anywhere you want with all of your dotfiles and them symlink those files to where they need to go? Well, that's what you end up with. Stow just automates the "symlink those files part".
Earlier quoted context omitted.
> Right, but when you unlink it from your home directory, the file still exists in the git repo. That's a feature.
Not when you are looking for a workflow to make dealing with dotfiles faster and more painless. With the current (symlink based) setup, there is a hidden state you must hold in your head or else carefully inspect: the discrepancy between your git repo and your home directory. Maybe you forgot to link a dotfile, and that’s why your latest configuration doesn’t work. Ditto for unlinking a dotfile.
I also don't have all dotfiles under version control, just the ones I've essentially "built myself", so maybe that makes it easier.
Earlier quoted context omitted.
You mean what we had with project Athena for decades? Or NFS mounted homework? Or plan 9?
> Or NFS mounted homework? I would not wish this pain on others. It works great when your systems are homogenous. It rapidly becomes a pain when you need to make customizations that only apply in a particular network, or on hosts with a particular OS version, etc. My bashrc has basically just become a monstrosity to control what files get sourced for this particular host. Answering why a particular env car is set to…
At heart it's a short snippet that just checks for existence and sources each file in the directory:
https://github.com/targaryen/bashrcd/blob/master/install/ins...
I added aliases to list/edit/remove entries from the .bashrcd directory and resource it. And a script I can call with a one-liner to edit bashrc on a new machine to add the sourcing and the helper aliases.
It'll load alphabetically so I can prefix entries with a number to specify load order (defaulting to 0100 so I don't need to specify this in the commands unless I explicitly changed them).
So the end result is that I can quickly edit or create a new bashrc entry by running 'ebrc entryname'. This opens ~/.bashrcd/0100--entryname in vi, and when it's saved it'll re-source so the add/change takes effect immediately.
Or 'lbrc' to list contents of the directory, or 'rbrc entryname' to remove ~/.bashrcd/0100--entryname
It's fairly simplistic but takes away most of the cognitive load of managing a complex bashrc.
You don't need symlinks, setup scripts, etc. Try this: 1. Bare git repo in your home directory ($HOME/.files) 2. Alias for prefixing git commands ("env GIT_WORK_TREE=$HOME GIT_DIR=$HOME/.files") 3. Strict .gitignore file (that ignores all files by default) Simple to add files: `h git add .vimrc` Have this set up for myself. Works great https://github.com/tmm/dotfiles
I explain here the steps of how I do it: https://github.com/josepmdc/dotfiles#2-if-you-want-to-manage...