nixcfg icon indicating copy to clipboard operation
nixcfg copied to clipboard

Set up ZFS

Open jakeisnt opened this issue 4 years ago • 5 comments

ext4 is pretty fast, but it would be great to gain some experience with more advanced file systems. Supposedly ZFS has excellent NixOS support; figure out how to get it working!

Vultr is running with btrfs already, but oracle isn't very nice.

jakeisnt avatar Jan 04 '21 00:01 jakeisnt

Snippet for ZFS backups:

services.znapzend = {
      enable = true;
      autoCreation = true;
      pure = true;
      zetup = let
        localOnlyNotRecursive = {
          enable = true;
          plan = "1hour=>15min,1day=>1hour,4day=>1day,1month=>1week";
          timestampFormat = "%Y-%m-%d--%H%M%SZ";
        };
      in
        {
          "tank/user/home" = {
            enable = true;
            plan = "15min=>5min,4hour=>15min,2day=>1hour,4day=>1day,3week=>1week";
            recursive = true;
            timestampFormat = "%Y-%m-%d--%H%M%SZ";
            destinations.kif = {
              plan = "1hour=>5min,4day=>1hour,1week=>1day,1year=>1week,10year=>1month";
              host = "kif";
              dataset = "rpool/backups/gsc.io/Petunia/home";
            };
          };

          # less robust snapshot techniques
          "tank/system/persist" = localOnlyNotRecursive;
        };
    };

from https://github.com/grahamc/nixos-config/blob/master/devices/petunia/configuration.nix. Could be helpful for system backups.

jakeisnt avatar Jan 11 '21 01:01 jakeisnt

https://www.znapzend.org/

jakeisnt avatar Jan 11 '21 01:01 jakeisnt

Make sure to create a separate file system partition for Nix packages, /nix.

jakeisnt avatar Jan 11 '21 02:01 jakeisnt

Use this system to investigate backups, too!

jakeisnt avatar Jan 11 '21 02:01 jakeisnt

https://mt-caret.github.io/blog/posts/2020-06-29-optin-state.html#fnref1

https://grahamc.com/blog/erase-your-darlings

set this up! this will ensure that my configuration is precisely reproducible. i have to set up a backup solution for secret keys, photos and videos though...

jakeisnt avatar Jan 11 '21 22:01 jakeisnt