From 0480304036a0b87cb0b1ad38e6a5e7a2d043d312 Mon Sep 17 00:00:00 2001 From: coolneng Date: Wed, 29 Apr 2020 02:50:17 +0200 Subject: [PATCH] Add ZFS automatic snapshot solution --- configuration.nix | 1 + modules/datasync.nix | 33 +++++++++++++++++++++++++++++++++ modules/software.nix | 14 ++++++++------ 3 files changed, 42 insertions(+), 6 deletions(-) create mode 100644 modules/datasync.nix diff --git a/configuration.nix b/configuration.nix index 2f64fc7..54eb8b8 100644 --- a/configuration.nix +++ b/configuration.nix @@ -69,6 +69,7 @@ ./modules/software.nix ./modules/networking.nix ./modules/gui.nix + ./modules/datasync.nix ]; } diff --git a/modules/datasync.nix b/modules/datasync.nix new file mode 100644 index 0000000..3e871e8 --- /dev/null +++ b/modules/datasync.nix @@ -0,0 +1,33 @@ +{ config, lib, pkgs, ... }: + +{ + # ZFS automatic backup solution + services.znapzend = { + enable = true; + autoCreation = true; + features = { + compressed = true; + recvu = true; + }; + zetup = { + "syscea/state/root" = { + plan = "1d=>1h,1m=>1d,1y=>1m"; + recursive = true; + mbuffer = true; + destinations.remote = { + host = "coolneng@zion"; + dataset = "syscea/root"; + }; + }; + "syscea/state/home" = { + plan = "1d=>1h,1m=>1d,1y=>1m"; + recursive = true; + mbuffer = true; + destinations.remote = { + host = "coolneng@zion"; + dataset = "syscea/home"; + }; + }; + }; + }; +} diff --git a/modules/software.nix b/modules/software.nix index fb061c9..1190c70 100644 --- a/modules/software.nix +++ b/modules/software.nix @@ -2,20 +2,20 @@ { environment.systemPackages = with pkgs; [ - # Developement - git lorri + # Development + git direnv lorri # Monitoring htop # Text editors neovim emacs - # Terminal multiplexing - tmux tmuxp + # Terminals + kitty tmux tmuxp # Password management - pass passff-host + pass-wayland passff-host gitAndTools.pass-git-helper # Browsers firefox chromium # LaTeX - tectonic pandoc + texlive.combind.scheme-full pandoc pandoc-citeproc ]; # Fonts declaration @@ -24,6 +24,8 @@ google-fonts siji cherry + iosevka + emacs.all-the-icons-fonts ]; };