on gentoo for example I have accrued a few files under /etc/portage that to my knowledge just have to live there…

right now I basically rely on my backups for this. but maybe somebody knows a clever way to handle this?

10 points

Maybe etckeeper fits your use case? It’s specifically built for managing /etc files with version control systems. I can’t say much about it since I’ve never used it, though.

permalink
report
reply
1 point

I’m replying here because I think yours is the right answer (etckeeper), but for other readers I want to note that for Arch Linux in particular, an alternative is aconfmgr.

permalink
report
parent
reply
9 points

I personally symlink/hardlink to my dotfiles repo. You can see an example of it here.

permalink
report
reply
6 points

There should be no dotfiles outside of home directories so I assume you mean a config file. In those cases, git and symlinks are a great option. Make a config directory in your home dir and organize it however you want. Include config files for the tools you’re interested in, commit them to git for backups and then symlink/hardlink the file to the expected path for the application.

permalink
report
reply
6 points
*

NixOS does that well. I never quite managed to figure out a solution to this on other distros (which is actually what led me into making the jump in the end).

permalink
report
reply
5 points

@gkpy I assume by “dotfiles” you simply mean “config files” as there should be nothing in your /etc/portage directory that’s hidden. For all configs I want to backup, I just keep a copy of them elsewhere. As for portage stuff, I just copy my make.conf, and everything in each repos.conf and package.* directories.

If you want to simplify a complex solution to an already simple thing, take a look at bare git worktrees.

permalink
report
reply
1 point
*

The other portage-relevant file you might want to back up is /var/lib/portage/world, which isn’t even in /etc.

permalink
report
parent
reply
1 point

@nyan Yes, always backup world if nothing else. How the hell’d I forget that!. I usually symlink it to /etc but then forget I did when updating backups. Worst case, I wind up with a slightly old world file if I need no rebuild.

permalink
report
parent
reply
1 point

You were probably microfocused on /etc. I’ve done the same thing in similar situations.

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

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

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

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

Community stats

  • 8.4K

    Monthly active users

  • 6.3K

    Posts

  • 172K

    Comments