Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Rotz: Cross platform dotfile manager written in Rust (volllly.github.io)
97 points by thunderbong on April 8, 2024 | hide | past | favorite | 44 comments


I don't get those dotfile managers. I just have a git repo with a branch for every machine. And my dotfiles are in many formats, not just yaml toml and JSON...


> not just yaml toml and JSON

those are the formats available for configuring rotz itself; it's agnostic to the content of your actual dotfiles


Are your per-machine branches mostly distinct, or do they share a lot?

I use https://github.com/thoughtbot/rcm and I find my dotfiles share _quite a bit_ in some respects (e.g. neovim config) but are drastically different in others (SSH config as one example) -- keeping things synced _across_ branches sounds very difficult. rcm handles this well, without branches, IMO.


You can have shared files and source them


> I just have a git repo with a branch for every machine.

Aren't you supposed to "not" commit secrets/sensitive values to git repos as "best practice"?


I guess it's a private repo...


For many dotfile configs such as text editors, aliases or else not involving security, I personally don't care if it's public. Take this example https://github.com/AzogMugen/shortcuts-config/tree/master/ho...


Where does their comment indicate they commit secrets?


Perhaps SSH/GPG private keys are .gitignored?


I protect my ssh keys with passphrases, and then load the keys using ssh-add.


I also don't get these, but for another reason: why write a dotfiles-specific configuration management tool with templating, conditions and all of that when we already have proper SCMs like salt or ansible that perfectly scale down to a single user and a small number of configs, but are still orders of magnitude more powerful when you need it.


I will do a lot of work to avoid having to touch ansible and friends. Fortunately, I don't have to do a lot of work because I spent 10 minutes writing a 50 line Go program a decade ago that has done everything I've needed it to do in the interim (IIRC the only change I made to it was supporting Go modules back in ~2015).


[chezmoi](https://github.com/twpayne/chezmoi) works okay for me. I like that it can add files and push them to GitHub in a single command


Chezmoi is great, and very fully featured. But this is one of those itches we're doomed to see reinvented constantly, in every language that is the favourite of the author, with ever so minor variations.


I am a huge fan of chezmoi, it takes time to wrap your head around it but once you are setup it's is great. I keep windows, Linux/FreeBSD severs and Linux desktops all synced up with chezmoi.

Previously I used xstow for 10 years which served me well and is less of a challenge to get started with compared to chezmoi.


Is there any specific benefit of using this instead of GNU stow besides the Windows support(for Linux/OS X only folks)?


Means snot in German


I guess that's where the nose comes from


Would like to add the colloquial expression for writing bad code and in general writing something without due diligence: "hinrotzen"


Yes, kind of my first thought, and it reminded me of similar fun stuff like Wix, Mitsubishi Pajero, etc.

The developer seems to be from Austria, so yeah, he knew what he was doing.


Figma sounds like fick ma' (just fuck)


also "let's fuck" ma is used colloquially for wir (we)


Reminds me of my own project, Comtrya

One of our goals is to run anywhere too, we have support for BSD as well as Windows, macOS, and Linux; as well as first class variant support for "define once, run everywhere" functionality.

Our core lib is available and built to support other dot file managers, perhaps it could be useful to you.

https://github.com/comtrya/comtrya


I'm yet to look at your project, but I can't say Comtrya without thinking about Stargate, so I'm kinda sold already.


"This is...better?" :-)


Comtraaaya! :)


What a coincidence. I was looking at awesome dotfiles on GitHub. I started thinking of jumping onto the "manage dotfile" bandwagon after reading today's LWN note on the GNU Stow release. I shortlisted Chezmoi and Comtrya to play with. Then I saw this.


Been using chezmoi for a while now and mostly happy with it. Managing most of my work and personal configs/dotfiles for PowerShell Core, bash, and zsh across Windows, Mac, and Linux.

The only problem I've run into is that while chezmoi supports tracking files/directories as read-only, once they are created they can't be updated anymore because chezmoi isn't smart enough to swap them to writable and back.


Thanks. I shortlisted Chezmoi. Though I often run into git-related issues with merge conflict, it looks like it has the most brain-share in the community.


Hm, I don't think I understand how this is supposed to work. The documentation is very barebones and doesn't explain much.

It talks about symlinking your dotfiles from somewhere else on your system, so is this only useful if you have multiple users and they share dotfiles? How does that help if you want to sync dotfiles between machines?

Then it talks about YAML and toml formats but it's not very clear to me if that is the format of the dotfiles that it manages, or if that is only the config file for Rotz itself?

Also it looks like you have to write a config file for every dot file you manage?

This seems overly complicated to, say, a simple git repo. A simple example would have been helpful in the documentation I guess....


Every time I have tried to use dotfiles across OS installations, it failed miserably. Software failed in mysterious ways when the configuration was slightly off between versions/builds.

Might make sense if you have a large amount of time to keep tinkering with your computer, but probably not a productivity boost in any form.


To the folks who missed the nose next to the name of the app, I needed a second look.


Oh neat. It seems useful to manage this through a CLI tool! I wonder if something like this can build in protections for common dot file mistakes like accidentally committing API keys in one’s dot files?

Nice idea!


You can put something like detect-secrets[1] in a commit hook.

  no_secrets=$(git diff --staged --name-only -z | xargs -0 detect-secrets-hook --baseline .secrets.baseline)
  test -z $no_secrets && exit $no_secrets
1: https://github.com/Yelp/detect-secrets


I've been looking for a cross-platform dotfile management tool and I had some hope for this but it seems a little too complex, and I don't like that I would end up with lots of yaml/toml/json files. I use Mac, Windows, and Linux and I want to have a single configuration for all. I've been using https://github.com/rhysd/dotfiles and it is the only thing that really works well for me.


How’s this compare to other dotfile managers? The docs are very barebones and don’t explain the benefits to using this, or really what this is doing under the hood.


I just wrote my own dotfiles manager in Ruby [1]. Not too hard, imo.

[1] https://github.com/danieljaouen/dotfiles/blob/main/Rakefile

Edit: I agree that the path/old_path/new_path naming is confusing, I just never got around to refactoring it. :/


shameless plug, I wrote my own too called dotbot. I modeled it after the python version.

https://github.com/sigmonsays/dotbot


This is really an unfortunate name - literally „snot“ in German.


It seems they're fully aware of it - the logo in the website is a nose emoji.


Also repository owner seems to be from Austria.


Related: Wix (Website Builder) — https://www.youtube.com/watch?v=v2L4G1_eVOk


I'm pretty sure that's intentional. ;)


You may be seeing a feature as a bug




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: