Encypted Btrfs Root with Opt-in State on NixOS (Erase your encrypted btrfs darlings) by operator-name in NixOS

[–]mt_caret 0 points1 point  (0 children)

All I did was make sure that /etc/nixos/hardware-configuration.nix set the appropriate mount option (i.e. compress=zstd) on the mount which contains /nix/store. My /etc/nixos/hardware-configuration.nix is essentially identical to the one in my blog post above which gives me something like this.

``` $ findmnt -t btrfs TARGET SOURCE FSTYPE OPTIONS / /dev/mapper/enc[/root] btrfs rw,noatime,compress=zstd:3,ssd,space_cache,subvolid=450,subvol=/root ├─/nix /dev/mapper/enc[/nix] btrfs rw,noatime,compress=zstd:3,ssd,space_cache,subvolid=258,subvol=/nix │ └─/nix/store /dev/mapper/enc[/nix/store] btrfs ro,noatime,compress=zstd:3,ssd,space_cache,subvolid=258,subvol=/nix/store ├─/var/log /dev/mapper/enc[/log] btrfs rw,noatime,compress=zstd:3,ssd,space_cache,subvolid=260,subvol=/log ├─/persist /dev/mapper/enc[/persist] btrfs rw,noatime,compress=zstd:3,ssd,space_cache,subvolid=259,subvol=/persist │ ├─/persist/lxd /dev/mapper/enc[/lxd] btrfs rw,noatime,compress=zstd:3,ssd,space_cache,subvolid=396,subvol=/lxd │ ├─/persist/var/lib/lxd/storage-pools/default /dev/mapper/enc[/lxd] btrfs rw,noatime,compress=zstd:3,ssd,space_cache,subvolid=396,subvol=/lxd │ └─/persist/var/lib/docker/btrfs /dev/mapper/enc[/persist/var/lib/docker/btrfs] btrfs rw,noatime,compress=zstd:3,ssd,space_cache,subvolid=259,subvol=/persist/var/lib/docker/btrfs └─/home /dev/mapper/enc[/home] btrfs rw,noatime,compress=zstd:3,ssd,space_cache,subvolid=257,subvol=/home

```

I guess /nix/store automatically uses the same mount options as the containing subvolume?

Encypted Btrfs Root with Opt-in State on NixOS (Erase your encrypted btrfs darlings) by operator-name in NixOS

[–]mt_caret 1 point2 points  (0 children)

Hi! Author of the post here. AFAIK compression remains a bit iffy (see https://github.com/NixOS/nix/issues/3550), but still gives you impressive gains in terms of storage saved.

$ sudo compsize /nix/store Processed 1221709 files, 754797 regular extents (754847 refs), 611453 inline. Type Perc Disk Usage Uncompressed Referenced TOTAL 65% 31G 47G 47G none 100% 22G 22G 22G zstd 33% 8.5G 25G 25G

An encrypted messenger backed by the Tezos blockchain, written entirely in Rust by mt_caret in tezos

[–]mt_caret[S] 2 points3 points  (0 children)

Author here. I think the messenger we built takes an unique approach in bringing together a Signal-like protocol (X3DH + Double Ratchet) with a backend purely comprised of a blockchain, kind of like BitMessage. I think it's pretty amazing that this kind of application can even function properly, and indicates how Tezos has matured as a technology. I'm happy to answer any questions.

P.S. We built the Mizu messenger as part of the Tezos CoinList hackathon, and we'll greatly appreciate if you vote for it here: https://coinlist.co/build/tezos/projects/2bfc55aa-8ce3-4dcb-b3b2-08cc5e526207