From 4e280aeb6968d46f769f1046c368239fc3b7c79a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Thu, 5 Jan 2023 10:11:39 +0200 Subject: [PATCH] remove mosh; replace autoSnap with sanoid sanoid has a post-snapshot script which I can use to create a template --- configuration.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/configuration.nix b/configuration.nix index cd3a2c3..04cc01d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -70,24 +70,27 @@ let ssh_pubkeys = { ]; programs.mtr.enable = true; - programs.mosh.enable = true; services = { zfs = { - autoSnapshot = { - enable = true; - frequent = 0; - hourly = 24; - daily = 7; - weekly = 0; - monthly = 0; - }; - autoScrub.enable = true; trim.enable = true; expandOnBoot = "all"; }; + sanoid = { + enable = true; + templates.prod = { + hourly = 24; + daily = 7; + autosnap = true; + autoprune = true; + }; + datasets."rpool/nixos/home".use_template = [ "prod" ]; + datasets."rpool/nixos/var".use_template = [ "prod" ]; + extraArgs = [ "--verbose" ]; + }; + openssh = { enable = true; passwordAuthentication = false;