nixcfg
nixcfg copied to clipboard
Set up ZFS
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.
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.
https://www.znapzend.org/
Make sure to create a separate file system partition for Nix packages, /nix.
Use this system to investigate backups, too!
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...