Live data from Hacker News

Dotfiles Management

mitxela.com

101–110 of 143 posts

Re: Dotfiles Management

#101

Earlier quoted context omitted.

Nix is like sailing from Oakland to San Francisco on an aircraft carrier for your daily commute. Most stuff I care about factors out into .config which I turn into a git repo, push to GitHub and slap on a CI checks for secrets. Most engineers don’t need to forge a demonic pact with the Nix gods who demand I upend and replace everything from my operating system to my wife.

Yes, in that it's military-grade technology that needs to be more accessible to the public. Otherwise I don't agree with your analogy.

Actual "military grade tech" assumes field service by minimally trained personnel and an efficient logistic chain of supply. This is is the opposite of Nix, which requires months of self-training futzing around with obscure commands and an obscurer language, backed by an out of date unsorted mound of documentation and recipes.

Re: Dotfiles Management

#102
post #84
post #42

Earlier quoted context omitted.

You're only likely to screw things up once you start digging deeper into the Nix language/stdlib. I was put off by the warning at first as well, but it's honestly awesome having functional dotfiles that work reasonably consistently across NixOS (personal)/Ubuntu (work)/MacOS (work). > bad docs Yeah, pretty damned awful. > error messages That too. I honestly think that inventing a language was a huge mistake. Guix too…

Honestly, it really is not the language that’s the problem. While there are a few cases where it can trip you up at first, you wouldn’t be singing package descriptors even if it were Python — it simply has a business domain which is non-trivial. This non-triviality and organic growth show on the standard library of nix packages, but I fail to see how a lisp language or whatever be immune to it, besides having learned…

Nix is building a package manager AND a programming language. Guix is building a package manager only. It's a resourcing thing.

Re: Dotfiles Management

#104
post #10

Earlier quoted context omitted.

I was interested in chezmoi, but they don't want you[1] managing files outside your home directory which made it a non-starter. I need to manage /etc/ and /usr/local/ too. [1] https://www.chezmoi.io/user-guide/frequently-asked-questions...

I've been using chezmoi too and this is the only feature I miss. It'd be interesting to know what solutions folks are using. Chezmoi has some discussions around it, mostly recommending to use run scripts.

I didn't discover Chezmoi until seeing this thread (sigh). I developed a tool, filetailor, with an almost identical goal (dotfile management while accounting for differences across machines). It uses Python and YAML, but from what I can tell is similar in concept to Chezmoi.

https://github.com/k4j8/filetailor

One thing I like about filetailor I didn't see in Chezmoi was the ability to surround code with a comment specifying which machines it should be commented/uncommented for. It's easier than templates in some situations.

It works great, but there's probably tons of bugs that occur when used by someone other than me. I don't have a CS background and this was my first big hobby project.

Re: Dotfiles Management

#105

Checkout chezmoi, I’ve been using it for a few years and it ticks every box for me - various machines, different configs, scripts, passwords etc https://www.chezmoi.io/

been using chezmoi for the past 3 months across 4 machines. i like the template support, but i constantly feel like there's complexity hiding. im finding myself needing to relearn various bits of how it works after not touching it for a few weeks at a time. by far, my favorite thing about chezmoi is that you're managing a separate set of files and syncing then to your homedir, making it reallllllly easy to switch too…

My homebrew solution uses comments surrounding or in-line with the code that is machine-specific. The program then uncomments/comments the code appropriately as it is backed up and restored.

What do you think of this approach? Would that remove the complexity hiding?

Re: Dotfiles Management

#106

Earlier quoted context omitted.

Yes, in that it's military-grade technology that needs to be more accessible to the public. Otherwise I don't agree with your analogy.

Actual "military grade tech" assumes field service by minimally trained personnel and an efficient logistic chain of supply. This is is the opposite of Nix, which requires months of self-training futzing around with obscure commands and an obscurer language, backed by an out of date unsorted mound of documentation and recipes.

An F-18 is military-grade tech and no minimally trained personnel are getting anywhere near it. It's all just bad analogies is my point.

Re: Dotfiles Management

#108

I do something similar, albeit a bit more bare-bones. I keep my dotfiles in a dotfiles folder that is a git repo and then just have a simple script to symlink everything. I have a couple of submodules in there (zplug, pyenv) and a bash script to keep them up to date, and then a few self managed binaries, like fnm. That's about it. I don't bother trying to manage anything outside of home or deal with secret values by…

I use Homeshick for this, which also allows me to have multiple repos: https://github.com/andsens/homeshick

Re: Dotfiles Management

#109
post #52

Earlier quoted context omitted.

Nix is a huge dependency though, in a lot of sense (have to learn a new programming language rather than invest in your git skills etc.). Even if you are mostly running nixos.

It's a one time investment though, and the payback is huge.

The payback isn't much compared to a regular git repo.

I love nixos but home-manager is just too much to force into all my other machines.

Re: Dotfiles Management

#110

I do something similar, albeit a bit more bare-bones. I keep my dotfiles in a dotfiles folder that is a git repo and then just have a simple script to symlink everything. I have a couple of submodules in there (zplug, pyenv) and a bash script to keep them up to date, and then a few self managed binaries, like fnm. That's about it. I don't bother trying to manage anything outside of home or deal with secret values by…

This is exactly my setup. Add onto this a simple install script and you have an easy way to quickly provision (is that the right word?) a new laptop.

Mine uses Homebrew to install my favorite binaries and also runs a zsh script to configure macOS defaults how I like it.

Post reply on HN