Live data from Hacker News

Yadm: Yet Another Dotfiles Manager

github.com

11–20 of 25 posts

Re: Yadm: Yet Another Dotfiles Manager

#13
post #2

Transitioned from gnu stow to nix/home-manager and haven't looked back. The great part about that setup is my configuration contains not just my dotfiles, but also the installation of the programs themselves. I don't use the "nix" way of configuration though, I instead have home manager symlink everthing for me. Then I can bail on nix anytime and not have to translate all my files back to yaml. Glad programs like the…

I’m fully invested in Nix/Home Manager, and I use YADM to manage the nix files and other random stuff that isn’t in Home Manager yet or doesn’t fit.

IMO it’s a good fit to use them together. YADM lets me do things like easily setting per-host configurations, encrypting secret files, etc.

My new host setup is to use YADM to pull my dot files, then install nix and run home-manager to install everything else. YADM even supports bootstrapping to automate that for me

Re: Yadm: Yet Another Dotfiles Manager

#14
post #2

Transitioned from gnu stow to nix/home-manager and haven't looked back. The great part about that setup is my configuration contains not just my dotfiles, but also the installation of the programs themselves. I don't use the "nix" way of configuration though, I instead have home manager symlink everthing for me. Then I can bail on nix anytime and not have to translate all my files back to yaml. Glad programs like the…

I’m fully invested in Nix/Home Manager, and I use YADM to manage the nix files and other random stuff that isn’t in Home Manager yet or doesn’t fit. IMO it’s a good fit to use them together. YADM lets me do things like easily setting per-host configurations, encrypting secret files, etc. My new host setup is to use YADM to pull my dot files, then install nix and run home-manager to install everything else. YADM even…

Without more information, that sounds like extra complexity. You can easily do per-host configurations using home-manager. Actually, I consider that one of the perks of the nix based setup, so I'm not sure why I'd want another tool for that.

Re: Yadm: Yet Another Dotfiles Manager

#15
post #2

Transitioned from gnu stow to nix/home-manager and haven't looked back. The great part about that setup is my configuration contains not just my dotfiles, but also the installation of the programs themselves. I don't use the "nix" way of configuration though, I instead have home manager symlink everthing for me. Then I can bail on nix anytime and not have to translate all my files back to yaml. Glad programs like the…

I’m fully invested in Nix/Home Manager, and I use YADM to manage the nix files and other random stuff that isn’t in Home Manager yet or doesn’t fit. IMO it’s a good fit to use them together. YADM lets me do things like easily setting per-host configurations, encrypting secret files, etc. My new host setup is to use YADM to pull my dot files, then install nix and run home-manager to install everything else. YADM even…

I wrote a little tool that symlinks stuff from your git repo into $HOME.

https://github.com/Lillecarl/nixos/blob/master/users/lilleca... https://github.com/Lillecarl/nixos/blob/master/scripts/uglin...

There's something called mkOutOfStoreSymlink that does this natively, but it makes a symlinks from $HOME -> store -> git repo which annoyed me a bit.

For me getting my home environment up and running is just "FLAKE=$PWD nix run nixpkgs#home-manager -- --flake $FLAKE - - impure"

It's nice to not use "Real home manager" for some kinds of configurations since Nix is pretty slow.

Re: Yadm: Yet Another Dotfiles Manager

#18
My only complaint about yadm is that I've never managed to get its use of git submodules to work reliably. Sometimes I think I get it working, then notice that the submodule lags behind the remote git repo, and no amount of prodding at it gets it to go to the (real) head.

Re: Yadm: Yet Another Dotfiles Manager

#19
post #2

Transitioned from gnu stow to nix/home-manager and haven't looked back. The great part about that setup is my configuration contains not just my dotfiles, but also the installation of the programs themselves. I don't use the "nix" way of configuration though, I instead have home manager symlink everthing for me. Then I can bail on nix anytime and not have to translate all my files back to yaml. Glad programs like the…

Doesn’t that limit you to deploy dot files to nix available system only? That’s the primary reason I don’t use home manager.

Re: Yadm: Yet Another Dotfiles Manager

#20
post #18

My only complaint about yadm is that I've never managed to get its use of git submodules to work reliably. Sometimes I think I get it working, then notice that the submodule lags behind the remote git repo, and no amount of prodding at it gets it to go to the (real) head.

submodules may or may not be annoying to use in a particular use case, but they work perfectly (in that they do what they do, not necessarily what you want/expect)

from your comment, it sounds like you might not have the exact mental model of how they are expected to work?

> then notice that the submodule lags behind the remote git repo

the version of the submodule is staked to an exact commit hash in the main (outer) git repo. the use case is that the submodule should not "float" or change - if you check out a particular commit in the main repo, it will always point to this same submodule commit

if you change the main repo branch, etc. you additionally have to ask to sync up the submodule for that new commit. i use:

    git submodule update --init
instead, if you want to update the submodule to a new commit (e.g. to latest master branch), you have to enter the submodule, checkout the branch and pull. then in the main repo, you will add the submodule and commit it to link to the new submodule commit.

so that can be annoying of course. but i find it works extremely well for submodules that are dependencies that you want staked to an exact version.

Post reply on HN