| 13 Feb 2024 |
maralorn | In reply to @lassulus:lassul.us but if you need them during installation you have to do them with the hooks and a shell snippet Well, I am quite used to manually mounting my stuff, so that’s fine. | 01:40:15 |
maralorn | In reply to @adam:robins.wtf bcachefs subvolumes aren't separate mount points I know. That’s why I want to use bind mounts. | 01:40:35 |
lassulus | I guess you can do the bind muunt on a postMountHook on the btrfs rootfs? | 01:41:09 |
maralorn | Ah, related beast: Can I mount my disk at / and then bindmount a subdirectory of that disk to / effectively making the original filesystem root inaccessible? | 01:43:14 |
lassulus | not sure why not, but never tested it :D | 01:46:02 |
lassulus | maybe it becomes a loop thingie? | 01:46:14 |
maralorn | Well, maybe it’s not worth the complexity. | 01:55:55 |
@adam:robins.wtf | is there a need to have them mounted separately? | 01:56:22 |
maralorn | Don’t know. | 01:56:51 |
maralorn | I guess the easiest solution would be: Mount bcachefs on /, have /nix and /disk (that’s my data partition) be subvolumes. Then on boot reset / to be empty with exception of /nix and /disk. | 01:58:15 |
maralorn | Only question is: Is that possible with bcachefs? | 01:58:47 |
@adam:robins.wtf | the subvolume stuff is very basic | 01:59:28 |
@adam:robins.wtf | https://bcachefs-docs.readthedocs.io/en/latest/feat-subvolumes.html | 01:59:36 |
@adam:robins.wtf | it seems like you probably want btrfs or zfs instead | 01:59:56 |
maralorn | I most certainly want btrfs.^^ | 02:36:33 |
maralorn | I have been using it for 10 years and I am sick of it.^^ | 02:36:46 |
maralorn | In reply to @lassulus:lassul.us not sure why not, but never tested it :D Seems to work, when I do it manually. | 02:37:11 |
maralorn | * I most certainly don’t want btrfs.^^ | 02:37:26 |
maralorn | So here is my scheme: mount fs at /, remove subvolume /fsroot if exists, create subvolume /fsroot, bind mount /nix to /fsroot/nix and /disk to /fsroot/disk, bind mount /fsroot to /. | 02:39:03 |
maralorn | That we I start every boot with a clean / which has the same /nix and /disk. | 02:39:37 |
maralorn | * That way I start every boot with a clean / which has the same /nix and /disk. | 02:40:42 |
maralorn | No clue however if I can teach nixos to do those operations in that order.^^ | 02:41:10 |
maralorn | In reply to @lassulus:lassul.us maybe it becomes a loop thingie? I think so. / would depend on itself before it can be mounted. | 02:44:53 |
hexa | In reply to @maralorn:maralorn.de I most certainly don’t want btrfs.^^ I only recommend btrfs to my enemies | 02:51:11 |
raitobezarius | maralorn: bcachefs subvolumes are just directories with a special metadata attached | 03:05:26 |
raitobezarius | like btrfs ones | 03:05:27 |
raitobezarius | the only thing btrfs has over bcachefs in this instance is a mount option to make the binding not require any "parent" to be mount IIRC | 03:06:36 |
raitobezarius | (which is also fixable at bcachefs level if you are willing to do some C and Rust :P) | 03:07:07 |
raitobezarius | (but it's on my todolist to fix anyway) | 03:08:18 |
raitobezarius | In reply to @maralorn:maralorn.de No clue however if I can teach nixos to do those operations in that order.^^ I'd assume you'll need custom systemd unit code for this | 03:10:50 |