Hello, i would like to know how you manage your dotfiles.

Do you use some gui or tui?

There are many ways i don't what to do.

Probably im going to do git repo with lazygit. I like tuis. I am managing files on two artix linux systems 1- pc and 2- laptop

all 51 comments

sorted by: hot top controversial new old
[–] 43 points 10 months ago (1 child)

I don't... when setting up a new system I just copy what I need from any random machine I have logged into at the time. As I need different config for different systems it doesn't really make sense to have one perfect config on all either..

  • source
  • hideshow 1 child comment
  • [–] 30 points 10 months ago (2 children)

    Nix, but I’d only recommend it if you share my same brand of mental illness

  • source
  • hideshow 2 child comments
  • [–] 0 points 10 months ago

    I also share this brand of illness.

    As I was reluctant going all in, having kept them in git since 2012, I still keep a few of them in their own separate repository. I load them as a nix flake input, and put the files in the expected place using nixos. Works OK, but adds a bit of a roundtrip if you are experimenting with changes often.

    This also allows me to share some of them to my work machine, which uses nix, and other files on other systems that dont.

    That said, I consider myself all in nix quite some time ago, and have moved more and more of the config over to the nix repo using the nix language for config instead of the input flake config file approach. Iterating on it is much faster this way.

  • source
  • parent
  • [–] 26 points 10 months ago (1 child)

    chezmoi does everything I need. It's really nice; would recommend.

  • source
  • hideshow 1 child comment
  • [–] 18 points 10 months ago (1 child)

    GNU Stow, backed up to a git repo.

    For those who might not see the purpose, it’s for keeping your profiles on different machines in sync, especially if you use the terminal a lot.

  • source
  • hideshow 1 child comment
  • [–] 14 points 10 months ago (1 child)

    I used to have everything in a git repo, but nowadays I use Nix with Home Manager, and I don't want to look back.

  • source
  • hideshow 1 child comment
  • [–] 12 points 10 months ago (2 children)

    How many dot files are you changing to need some sort of manager?

  • source
  • hideshow 2 child comments
  • [–] 4 points 10 months ago

    For me it’s more about keeping multiple systems in sync and working as intended. E.g. I have my laptop, a home server with couple different distros and a few cloud VMs. Whenever I change a keybind in neovim or tmux or whatever, I just save the changes in a slightly different way and now every machine has those changes so I don’t need to update each machine manually.

  • source
  • parent
  • [–] 9 points 10 months ago (2 children)

    Don't need to I use nix

    This is how I handle my nix configs though

    https://github.com/Givlucas/nixos

  • source
  • hideshow 2 child comments
  • [–] 7 points 10 months ago* (1 child)

    I use yadm which is basically git repo with automated path handling and alternate files support. I heard that gnu stow is also a good choice, but I haven't tried that

  • source
  • hideshow 1 child comment
  • I use a bare git repo. After the initial set-up its just the basic git commands but invoked with a gitdf alias. I wrote a (non-monetized) blog post here about it.

    If still needing a tui you could write a simple helper script to call the commands.

  • source
  • [–] 6 points 10 months ago* (1 child)

    I'm using stow, and then git for versioning. The only question I'm currently facing is whether to keep my stow packages as individual got repos (so I can switch branches for radically different configs or new setups) or treat the whole lot as a big repo, and set the others up as subtrees.

  • source
  • hideshow 1 child comment
  • [–] 7 points 10 months ago

    IMO you shouldn't use branches for switching between configs. It makes it hard to compose and reuse your configuration.

    Just imagine you have a new config file that you now want to add to all of your machines. You'd now have to commit/cherry-pick on all of your branches. Change that file? Now you have to distribute the changes again and might even get conflicts.

    Additionally, many programs allow you to change your configuration directory via environment variables (usually XDG_CONFIG_HOME , I think). So you can even keep all machine-specifig configuration files in a single repo under different prefixes for those.

  • source
  • parent
  • [–] 6 points 10 months ago (3 children)

    I use Syncthing with a folder called "Configuration Files" where I drop all my sync-able configs and dotfiles and I simply symlink them as needed.

  • source
  • hideshow 3 child comments
  • [–] 2 points 10 months ago (2 children)

    So there's at least the two of us doing it this way. Syncthing is an absolutely fantastic tool.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 10 months ago (1 child)

    Yeah, it's fantastic. It's more effective at this than I thought because even though I use git a lot for programming and projects, I've admittedly forgotten far too often to commit and push/pull trivial changes on devices and in most cases, all I need is just for dotfiles to sync across devices anyway.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 10 months ago

    I am syncing a whole lot more than just dotfiles and have done so for years. Admittedly, I am running an always-on-instance (multiple, in fact…). Syncthing hasn't put a foot wrong in over a decade.

    I am donating a small amount to the project every month and would like to encourage others to do the same.

  • source
  • parent
  • [–] 5 points 10 months ago

    I use home-manager to manage most of my dotfiles and store them in a git repository. Additionally, I just symlink the configurations I'm too lazy to write as home-manager options (yet), which in turn is a decent way to make migrating to home-manager options less upfront.

  • source
  • [–] 4 points 10 months ago* (last edited 10 months ago)

    I use YADM which is a thin wrapper around a bare git repo but still has some creature comforts like per-machine configs and templating.
    Since you still need to interact with Git, I pair it with Lazygit. Love that software, I do everything Git with it now!
    Unfortunately it is a little jank due to the way Lazygit handles bare repos, thankfully there's a command that sets up the needed Git variables for it to work correctly: yadm enter lazygit

    I send the repo to my own Forgejo instance. Kinda overkill but I was already self-hosting other services so I thought "Fully private Git server just for me? Why not?"

    Now, this is only for managing user level files. For managing system level configs I haven't setup anything yet.
    YADM has a solution for this but it seems a little jank, maybe I'll learn Ansible instead, dunno.

  • source
  • [–] 3 points 10 months ago (3 children)

    I do a git repo for my dot files with an installer that configures it based on whether I’m using Linux, macOS, or FreeBSD; a server or desktop; and whether I’m in bash or zsh. It also includes a bunch of functions and aliases that I find useful. It’s not always pretty because I also use it as a practical place to try new shell script bits when I have time. I’m hoping to change some things around soon thanks to some ideas from Dave Eddy’s bash course at ysap.sh.

  • source
  • hideshow 3 child comments
  • [–] 1 point 10 months ago (2 children)

    i used to do this, but couldn't figure out how to stay on top of the changes introduced by distro's and updates to the apps; did you figure these out somehow?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 2 points 10 months ago (1 child)

    I pretty much stick to straight bash and core utils, so it’s not much of a burden. Plus on the Linux side, I mostly stay with Debian and its derivatives, which limits some of the work.

    But really I don’t consider every feature of my dot files to be a finished product. The core stuff is reliable, but if I catch a problem with anything more esoteric or if I see some functionality that looks interesting, it’s a brain teaser I get to tackle.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 1 point 10 months ago

    I pretty much stick to straight bash and core utils, so it’s not much of a burden...

    this has worked fairly well for me too and i've applied this logic to a few desktop environment apps that are seemingly ubiquitous in all of the distros.

    though, i still admire (and sometimes envy) the customizations that people make to their environments.

  • source
  • parent
  • [–] 3 points 10 months ago

    Chezmoi

    It’s the only one that just works and has enough features for me, but not too many.

  • source
  • [–] 3 points 10 months ago

    I don't necessarily sync my dotfiles across machines, at least not in a blanket fashion. But I use Seafile to keep all sorts of directories in sync across machines. It's basically a self-hostable Dropbox.

  • source
  • [–] 2 points 10 months ago

    I never did until I started using hyprland.

    Now I have those in a git repo: https://git.jeena.net/jeena/hypr-dotfiles

  • source
  • [–] 2 points 10 months ago

    I created a file tree that looks similar to my system's file tree, except it only contains all the files that I modified or added and only their respective directories. From there I just use rsync to sync those files/file tree to the system's /.

    It's convenient to see what changes I currently have but it requires a bit of manual maintenance. I only really started doing it that way because I was learning how to use rsync and I just kept going on with it because it was working for me.

    I'm only working with my laptop, android phone and two Raspberry Pi's so I can get with my little rsync based setup.

  • source
  • [–] 1 point 10 months ago

    Neovim and scp. I should clearly test some things.

  • source
  • [–] 2 points 10 months ago

    I use Chezmoi and a git repo for keeping mine in sync with each other across several machines.

  • source
  • [–] 1 point 10 months ago (3 children)

    I don't understand what to manage about dotfiles. You mean backups?

  • source
  • hideshow 3 child comments
  • [–] 2 points 10 months ago (1 child)

    It doesn't have to be a big baroque thing. When there's a dotfile I configure regularly, I move it to a Git repo and use stow to put it "back" into place with a symlink. On new machines, it isn't long before I try something that doesn't work or see the default shell prompt and go "oh yeah, I want my dotfiles", check out the repo, run a script that initializes a few things (some stuff is machine-specific so the script makes files for that stuff with helpful comments for me to remember the differences between login shells or whatever) and then I'm off to the races.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 10 months ago

    So its more a general question how to backup (with versioning) these files. I just always wondered what "manage" in this context meant. I don't handle them differently than any other file to backup.

  • source
  • parent
  • [–] 1 point 9 months ago*

    In my case, I use several different types of machines: Personal Linux desktop, personal low end Linux laptop, remote servers where I have sudo, work Mac, shared remote work servers where I don’t have sudo. I want my setup to be basically the same everywhere so that my muscle memory works, but there are some things that also need to be a bit different for each. Hence, a dot files manager that lets me run one command to keep my environment consistent in all those different targets. I use chezmoi + git for it nowadays.

  • source
  • parent
  • [–] 1 point 10 months ago

    Dazed and confused.

  • source
  • [–] 1 point 10 months ago

    Git repo that I sync with my raspberry pi. You never know if some of the dotfiles contain sensitive info so I like to keep them on machines that only I can access

  • source
  • [–] 1 point 10 months ago

    Heard about this on Linux Unplugged a few weeks back. Haven't had a chance to test it out yet, but it looks pretty cool.

    https://flathub.org/en/apps/com.ml4w.dotfilesinstaller

  • source
  • [–] 1 point 10 months ago

    https://github.com/thoughtbot/rcm once upon a time, but I haven't really had multiple dev computers for a while

  • source
  • [–] 1 point 10 months ago

    Recently learned about dotbot and it is perfect for me. Had a custom script to manage stow before.

  • source
  • [–] 1 point 10 months ago

    Don't think too hard on it. Just use git. For example, I have a repo called handy-scripts that hosts all my dotfiles. I just check that out into ${HOME}/projects/handy-scipts and then symlink everything from where it's expected to its corresponding place in the repo.

    As you make modifications, remember to occasionally do a git pull --rebase && git commit -m WIP && git push so that all your devices are synced up.

  • source
  • [–] 1 point 10 months ago

    For ZSH, I have a script that automatically installs oh-my-zsh and a bunch of zsh plugins, and changes my default shell to ZSH.

    For everything else, some files will just get copied over, others left behind. I only "manage" them when I need to view/edit them.

  • source
  • [–] 1 point 10 months ago (1 child)

    Nothing at all. If things go south on the install I'll have a clean slate. Really the only thing I have backed up are keys, everything else is nonessential.

  • source
  • hideshow 1 child comment