this post was submitted on 07 Oct 2025
17 points (94.7% liked)

Linux

58824 readers
510 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS
 

I'm trying to find a better solution to manage configuration files, both user's dotfiles and system files in /etc. I'm running an ubuntu server where I have a bunch services with custom configurations, and systemd drop-in files, but on top of that I also have some scripts and user dotfiles that I need to track.

What I'm doing right now is that I have a folder full of symlinks in the admin user's directory (poor username choice, btw) and I'm using bindfs to mount this directory inside a git repository, this way git won't see them as symlinks, and will version them as regular files. The problem with doing this is that as git deletes and rewrites files, bindfs fails to track the changes and converts the symlink to regular files.

I looked into chezmoi, but that is only meant to track user dotfiles and will refuse to add a file from /etc, that is unless doing some extra work. But even so, chezmoi will not track the user:group of files, so I would still have to manage that manually.

I also looked into GNU Stow, and that would not complain about files from /etc or anywhere, but it similarly will not track permissions and I would have to manage that manually.

I see that some people are using ansible to manage dotfiles, but at that point, it would make sense to just migrate to ansible, except I don't want to rebuild my server from scratch to use ansible. Also it looks like a lot to learn.

Is there a better solution I'm not seeing? Maybe something using git hooks?

you are viewing a single comment's thread
view the rest of the comments
[–] Overspark@piefed.social 3 points 2 days ago

dotfiles and system configuration are pretty different use-cases, usually when you do system-wide stuff you want to manage not just the configuration files but also what software is installed and a bunch of other things. Ansible or something else like it is definitely the right tool for the job. And Ansible isn't so difficult to learn, you only need to know like 5% of what it can do to be very effective.

For dotfiles my personal preference is dotbot, but there are MANY many different tools that are all good and are just different ways to accomplish roughly the same thing.