# Dotfiles management and update

**URL:** <https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496>\
**Category:** General\
**Created:** [May 16, 2025, 12:57am UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496 "2025-05-16T00:57:07Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![HighOrderLogic](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/highorderlogic/32/6498_2.png) [@HighOrderLogic](https://universal-blue.discourse.group/u/HighOrderLogic)\
**Post date:** [May 16, 2025, 12:57am UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/1 "2025-05-16T00:57:08Z")

</div>

Hi,

What would be the best way to manage dotfiles (~/.config, etc…) in an uBlue image? I want something that automatically updates when user rebase to a new image version, instead of manually copying everytime the system updates.

Thanks.

---

<div class="post-metadata">

**Author:** ![JohnAtl](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/johnatl/32/3485_2.png) [@JohnAtl](https://universal-blue.discourse.group/u/JohnAtl)\
**Post date:** [May 16, 2025, 1:25am UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/2 "2025-05-16T01:25:31Z")

</div>

Rebasing doesn’t affect your home folder.

> [@How can rebasing between desktop enviornments cause issues](https://universal-blue.discourse.group/t/how-can-rebasing-between-desktop-enviornments-cause-issues/8270/5):
>
> I would call that something the user slightly_smiling_face Essentially, rebasing changes the operating system. It would be like switching from Windows to macOS, but leaving your home folder untouched. KDE or Gnome, etc. may make changes to the home folder, but rebasing doesn’t.

---

<div class="post-metadata">

**Author:** ![j0rge](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/j0rge/32/8_2.png) [@j0rge](https://universal-blue.discourse.group/u/j0rge)\
**Post date:** [May 16, 2025, 1:29am UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/3 "2025-05-16T01:29:05Z")

</div>

[https://www.chezmoi.io/](https://www.chezmoi.io/) is what I recommend but we don’t have a super strong opinion on what people use.

But as john points out be careful in places where desktops step on each other’s files.

---

<div class="post-metadata">

**Author:** ![ajgraves](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/ajgraves/32/6477_2.png) [@ajgraves](https://universal-blue.discourse.group/u/ajgraves)\
**Post date:** [May 16, 2025, 1:31am UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/4 "2025-05-16T01:31:19Z")

</div>

Today I learned. Thanks for sharing this!

---

<div class="post-metadata">

**Author:** ![HighOrderLogic](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/highorderlogic/32/6498_2.png) [@HighOrderLogic](https://universal-blue.discourse.group/u/HighOrderLogic)\
**Post date:** [May 16, 2025, 1:43am UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/5 "2025-05-16T01:43:27Z")

</div>

Hi, thanks for your response.

I have seen chezmoi but that tool only pulls from a GitHub repo.

I want the dot files live in the same repo as where I build the image, so when users rebase, some process will copy/rsync the file to user’s home folder. This is kind of similar to NixOs, which updates users’s home config every time they change image.

---

<div class="post-metadata">

**Author:** ![fenglengshun](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/fenglengshun/32/367_2.png) [@fenglengshun](https://universal-blue.discourse.group/u/fenglengshun)\
**Post date:** [May 16, 2025, 4:23am UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/6 "2025-05-16T04:23:04Z")

</div>

I think you can make an image repo? It shouldn’t be too hard, and I use it to ship my [etc files](https://github.com/bayazidbh/ublue-whitesur/tree/live/usr/etc).

---

<div class="post-metadata">

**Author:** ![HighOrderLogic](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/highorderlogic/32/6498_2.png) [@HighOrderLogic](https://universal-blue.discourse.group/u/HighOrderLogic)\
**Post date:** [May 16, 2025, 4:46am UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/7 "2025-05-16T04:46:24Z")

</div>

I have taken a look at your repo before opening this thread but sadly it doesn’t do what I need.

I want the config in user’s home dir updates on rebase, and the skel folder only updates on user creation.

---

<div class="post-metadata">

**Author:** ![fenglengshun](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/fenglengshun/32/367_2.png) [@fenglengshun](https://universal-blue.discourse.group/u/fenglengshun)\
**Post date:** [May 16, 2025, 5:54am UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/8 "2025-05-16T05:54:27Z")

</div>

Yeah, I don’t know. My first thought is to make an /etc/rc script that checks a separate file – just to provide a check to see if the script has been run for the current base – then if it didn’t pass it’ll copy /etc/skel to the curren user home, overwriting their current config.

Idk I can’t think of anything that isn’t jank like that. There is of course Nix with flakes and home-manager, but that’s a whole different can of worms.

---

<div class="post-metadata">

**Author:** ![klmcw](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@klmcw](https://universal-blue.discourse.group/u/klmcw)\
**Post date:** [May 16, 2025, 3:32pm UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/9 "2025-05-16T15:32:30Z")

</div>

I have not used chezmoi as I wrote my own solution when I was still using Fedora WS.

It is a git repo with a script that has logic to create ~/.config dirs and merge things in place like ~/.gitconfig ==\> ~/.config/git/config, etc.

I add more to it as I discover things that do not automatically follow XDG but support it if certain things are in place- like emacs and vscode …

So just an idea to compliment chezmoi.

---

<div class="post-metadata">

**Author:** ![HighOrderLogic](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/highorderlogic/32/6498_2.png) [@HighOrderLogic](https://universal-blue.discourse.group/u/HighOrderLogic)\
**Post date:** [May 19, 2025, 2:58pm UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/10 "2025-05-19T14:58:50Z")

</div>

For anyone looking at this thread in the future: I just put files into the `skel` folder and `rsync` on every user login. Who cares about overrides /s.

---

<div class="post-metadata">

**Author:** ![m2Giles](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/m2giles/32/471_2.png) [@m2Giles](https://universal-blue.discourse.group/u/m2Giles)\
**Post date:** [May 20, 2025, 12:02am UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/11 "2025-05-20T00:02:27Z")

</div>

Most tools provide options to have a system level configuration. Usually those are configured in /usr or /etc

That would be the most appropriate place to put configurations made at an image level while per serving user’s ability to override.

Another option instead of of using rsync is to use user tempfiles.d. I do this to populate things in /run, /var, and /home on boot.

---

<div class="post-metadata">

**Author:** ![SylChamber](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/sylchamber/32/6422_2.png) [@SylChamber](https://universal-blue.discourse.group/u/SylChamber)\
**Post date:** [May 20, 2025, 9:59pm UTC](https://universal-blue.discourse.group/t/dotfiles-management-and-update/8496/12 "2025-05-20T21:59:32Z")

</div>

> I have seen chezmoi but that tool only pulls from a GitHub repo.

On the contrary, it does work with other git hosting service, see [Quick start - chezmoi](https://www.chezmoi.io/quick-start/#start-using-chezmoi-on-your-current-machine). I’ve used it at work with Azure Repos. Instead of `chezmoi init owner/repo`, you just specify the URL to your repo.
