How to Timeshift with BTRFS in NixOS

Only helpful replies please!

I have the problem that Timeshift does not work correctly in a NixOS installation with BTRFS. There are messages that the system is not set up similar to Ubuntu for BTRFS. Unfortunately I am missing information on how exactly Timeshift works under Linux in the BTRFS level, mount points and cloning.

I need to know what a BTRFS file system would have to look like at the mount level to be compatible with Timeshift? I suspect that the mount of /home is causing problems.

Thanks for any helpful answers.

Welcome to NixOS discourse! Do you have the impression there are many unhelpful replies here?

Anyhow, I just found that this appears to be a thing for other distros as well. Timeshift expects a certain way you call your btrfs subvolumes essentially.

Timeshift has some more info on their GitHub on how to setup your subvolumes:

Many thanks for the quick and helpful reply. I don’t know enough about github. I actually search more via search engines or videos. I did two things wrong I think. 1) I did not use grub 2. 2) I must have mounted /home somehow wrong.

I’ll tackle this again in the next few days.

I don’t know enough about github.

GitHub is the largest hosting service for so-called git repositories. Nowadays it belongs to Microsoft, and allows you to host your git repository online so others can collaborate with you on it.

Being familiar with Git and GitHub is really really really useful in general. And also with alternatives to GitHub such as Gitlab, Gitea and Forgejo, SourceHut or Bitbucket. (In decending order relative to my personal need to interact with them) At lot of open source code is hosted on these places.

Incidentally, nixpkgs which is used by nix to build NixOS is also hosted on GitHub. So if you have trouble with specific packages being outdated or causing problems on NixOS, you might want to navigate to GitHub and look what is happening in the repository for nixpkgs. Maybe there is already an issue open for your problem.

And if you ever plan on using nix flakes, in that case you are basically required for all practical purposes to use git to track changes to your flake. So having a place to host your system config as a flake might come in handy.

  1. I did not use grub 2. 2) I must have mounted /home somehow wrong.

Yes, using Grub appears to be mandatory. The root subvolume should be called @, and the home subvolume should be called @home. That is as much as I have gathered from the link I put in my post above. But don’t quote me on that, find a few more sources to be sure :slight_smile: