8 ms·
A cross-platform multi-target dotfiles manager written in Rust
- cquintana92 2y agoLooks like we took similar approaches! https://github.com/cquintana92/dotfilers https://github.com/cquintana92/dotfilers Congratulations, you too unlocked the "None of the hundreds that are out there work exactly like I want, so I'll write my own" badge.
- 1oooqooq 2y agowhy something so specialized needs a configuration file? my dot file scripts just have very opinionated dir/file naming conventions and things just fall into place. it's not like you need to give tune much... even adding the template thing which i think is overkill (time would be best spent with a way to validate code cross platform of you ask me.. templating makes this more difficult while pretending to remove the need for it)
- theophinetheo 2y agoCould have included a few screenshots.
- johnisgood 2y agoFor an utility like this?
- alkonaut 2y agoIs this using ”dotfiles” as a general term for ”text based configuration files”? Is this a thing? I only have two actual dotfiles on my system (git and one more)
- spoiler 2y agoLots of config files begin with a dot themselves or because they are inside dot-names directories (ie xdg config default to ~/.config)
- alkonaut 2y agoAt least on Linux they do yes. But this is cross platform. A Normal total number of dotfiles on a windows system is about 0 or 1.
- metaltyphoon 2y agoThis is not true. Open your user folder and there will be tons of dotfiles. If you use git with ssh or Rust (.cargo) or C# (.nuget) and many other tools. In fact, even .config is started to show up now. I guess devs are tired of %APPDATA% ?
- alkonaut 2y agoYes, I have 2 (nuget and git). But I obviously have many more text based configuration files than those. They just happen to have a name with a dot.
- wesselbindt 2y agoAre you using windows? I feel like dotfiles are much more common on unix-like systems. For me I've got dotfiles for zhs, ssh, git, two for my window manager, vim, and much more. I've even got one for nethack. I quite like it, I get new laptops up and running and feeling like home in a matter of minutes.
- 2y ago
- glutamate 2y agoSerious question: why Rust? Sounds like this is not exactly systems level programming or any user would suffer from or even notice garbage collection latency. Is Rust building up a decent ecosystem now for application programming? When I tried developing in Rust I came to the conclusion that you pay a heavy price for not having a garbage collector. Was I doing it wrong?
- terminaltrove 2y agoRust is a popular choice for CLI tools as well as Go and I do think the ecosystem is picking up. In fact there are a bunch of them for the terminal. https://terminaltrove.com/language/rust/ https://terminaltrove.com/language/rust/ https://terminaltrove.com/language/go/ https://terminaltrove.com/language/go/
- sepositus 2y agoI've used both, and they are comparable in library support. I happen to write _much_ faster in Go, so it's usually my default choice for CLIs, unless I specifically need to bridge with another Rust program.
- pkolaczk 2y agoRust is a general purpose programming language not just systems programming language.
- lionkor 2y agoI find Rust super ergonomic for any kind of app. The memory management aspect is trivial and second nature to anyone used to unmanaged languages, and the type system equally is not difficult to understand. It's a general purpose language, but it does give you full control. Plus, of course, you can encode a large amount of program states in the type system and borrowing checks enforce rules that programmers usually have to check in their head. I find that when I write Rust, I have to worry about an order of magnitude less about silly things like lifetime bugs, reference bugs, resource cleanup, all of which are 80% of my job when I write C#, or other similar managed languages. Plus Rust can generate a static executable, which is reasonably small, and doesn't require a third party runtime.
- terminaltrove 2y ago[dead]
- branneman 2y agoWhy no MacOS support if you claim cross-platform? That's not honest.
- politelemon 2y agoIt's still cross platform, just across Linux and Windows, doesn't look dishonest. It's similar to other "linux/macos"-only tools that also call themselves cross platform. The baffling part though is recommending using homebrew to install it on linux.
- johnisgood 2y ago> The baffling part though is recommending using homebrew to install it on linux. Do they really? Probably AI-generated.
- k3vinw 2y agoShameless plug for my bare repo git shell wrapper approach inspired by others: https://github.com/k3vinw/simple-dotfiles-kit https://github.com/k3vinw/simple-dotfiles-kit I’ve been using it for a couple years now and it’s worked well for me across multiple machines.
- dankobgd 2y agoThere are many of these tools but i don't like to think of these things like dotfiles. What is a dotfile? A `.something` file in my home dir? is /etc/environment a dotfile? No, but i wan't to manage it still. What about Librewolf policies.json in /usr/lib64/librewolf/policies or similar. It's not a dotfile either. For some tools, i need some other tools to exist already in path. What about zsh where i want to sync 3 git repos for syntax highlighting and other scripts? Also what about secrets, maybe i want some encrypted stuff so i need a solution for that also. Ansible is the best for these things, no symlinks needed, just configure what you want to exist and where and you can template configs or copy them or use some modules like `git_config` to then generate that ini file etc. Ansible vault also handles encryption easily so i can manage ssh keys, passwords...
- bipson 2y agoFrom skimming it seems it is feature wise very similar to yadm. Good, because I am a fan of yadm, but I also don't feel the need to switch ;)
- protortyp 2y agoCompletely unrelated, but I recently switched to using nix with home manager and nix-darwin to handle my entire dev setup and dotfiles. If you work a lot in remote dev environments (I use coder a lot at work) that really does the trick.
- dbalatero 2y agoI had to switch off nix because my company's security controls made it impossible to use :(
- indemnity 2y agoLikewise. I have two Mac laptops, three home servers, and a Windows desktop managed by Nix. The home servers are nixOS, the rest basically have the CLI environment managed with nix-darwin and nixos-wsl, all with one flake (Git repo) containing all the configuration. Case in point - this morning I’m rebuilding one of the servers onto new hardware, and the longest time spent was getting the flake config onto the server with git clone. Now just watching the rebuild switch command output, after which it’s good to go.
- MotiBanana 2y agoPretty cool, I personally just use Stow. 1. git clone my dotfiles repo 2. run `stow .` 3. profit This pretty much guarantees that if my Mac dies today, I can just get up and running in no time on a new machine.
- raaron773 2y agoSame. Stow is pretry great! I only recently discovered about the .stowignore very handy! This looks like it can work with windows as well and you can easily switch between profiles if you have multiple which is great too
- metaltyphoon 2y agoI need something that works across OSes. Chezmoi works pretty well.
- tempodox 2y agoI just use a “dotfiles” folder that is a git repo and then hard-link the files in there into the home directory. One for unprivileged user and one for root on each platform. Simple enough and doesn't require an extra tool.
- hk1337 2y agoI went a different route and use different branches for different OS environments. macOS, macOS-arm, Linux, Windows (wsl) The environments are basically the same in each but there’s some functionality I can do I one that I cannot do in another
- KetoManx64 2y agoHow do you handle differences between machines? I use cheznoi to manage my dotfiles and share them between 6 different devices, 2 of them are work machines. On my work machine I have maybe a 15% difference in config, primarily my hotkeys through keymapper, my SSH config files, and also the applications I have installed. Chezmoi let's me add logic to my source controlled config files that, based on the hostname/domain/network, etc let's me ouput different settings to the .config files, which I cannot do in the config files themselves. For example: On my home machine I have the following keymapper hotkey: Windows + T: Activate Telegram On my work machine that's mapped to: Windows + T: Activate Teams
- l00sed 2y agoI've used a similar tool, called dotter, by SuperCuber on GitHub. It's actually very similar--uses a handlebars template language and built in Rust. Definitely a must have if you're on multiple *nix systems and you've invested time into developing your configs!
- omani 2y ago> This project was driven by the personal need of having to manage several dotfiles for different machines/targets. the functionality OP is searching for is already provided by chezmoi. and many more features.
- devokin 2y agoWhy not stow? Am I missing out? I dont use Windows so not sure I need the cross platform.
- johnisgood 2y agoMade the same comment. Why not stow?
- baby_souffle 2y agoIs there a concise comparison between other tools? Specifically looking to see where this differs from chezmoi.
- Ecco 2y agoDumb yet serious question : what problem is a dotfile manager even trying to solve? Personally I have a git repo in my home directory and just commit dotfiles to it. The only drawback is that git always think there’s a git repo no matter where I am in my home, so I usually rename the .git folder to .git_hidden. And on the (rare) occasion that I want to update one of my dotfiles I just rename the .git_hidden directory back to .git. It’s really just two “mv” commands, I can’t believe you need a tool for just that. What am I missing out on?
- para_parolu 2y agoI recently learned it. I have personal and work laptops (two work laptops as of now for different companies). 90% of dotfiles should be the same. But rest is pain to sync. I’m using chezmoi that has templating mechanism that helps me.
- mdaniel 2y agoFWIW, you don't have to do that rename dance; git allows specifying the name of the .git metadata directory via `git --git-dir=$HOME/.git_hidden ...` or `GIT_DIR=$HOME/.git_hidden git ...` I don't know how big your .gitignore must be when trying to use a tool that wants to own every file and directory to manage your /home but if that works for you, more power to ya
- bean-weevil 2y agoStart with ls -a -w1 > .gitignore, then edit it and delete everything you want to track.
- Ecco 2y agoOh, interesting, thanks! And I don’t even bother with ignoring files! I just git add the ones I want to track :)
- johnisgood 2y agoHow about using GNU stow?
- DiabloD3 2y agoSo, I'm usually the huge Rust promoter, but we already have a lot of dotfiles managers, and Chezmoi, although written in Go, is right there. What can this one do that the other ones don't? The README lists features that, well, I'd already expect modern dotfile managers to be able to do.
- gbraad 2y agogood old stow and git, as most distros come with it. though, eager to try making a replacement in go that is a single binary