BTRFS-Assistant

I’m interested in learning how to build a package that can be used in my nixos or home manager config, but I’m not sure how to do it. The package is btrfs-assistant and I believe @dalto is the primary developer on it. Does anyone have a tutorial I could follow to continue on my nix learning journey?

2 Likes

This is already being packaged

Well, that’s awesome. I swear when I last looked, it wasn’t available.

It’s not merged, yet. There’s some stuff that’s hard coded in the source code that I’m trying to make the derivation support so that it doesn’t get incorrect runtime behavior.

3 Likes

It looks like your work is about to be part of nixpkgs. Nice work @khaneliman .

1 Like

I just did a test build of your package nix build "nixpkgs/7f6f891#btrfs-assistant on NixOS Gnome and it appears to be working; however, when I try to create a new snapper config it fails with the error “Failure (org.freedesktop.DBus.Error.ServiceUnknown).” I’m wondering if this is due to snapper being optional? Is there a parameter I need to pass during the build to enable snapper? Or maybe it has to do with running a QT application in Gnome?

Thanks.

From my testing, snapper’s implementation in NixOS is pretty underwhelming and not on parity with other linux distros. Snapper - should .snapshots subvolumes be created automatically? - #3 by claes example post. I had to basically describe my snapper config in my nixos config and you can just use Btrfs Assistant currently to browse and create snapshots but not configs.

I wonder if the paths for snapper and bash should be moved to the btrfs-assistant config file.

The nix packaging would still need to change those paths in the config but it wouldn’t have to patch the source.

1 Like