Add ZFS automatic snapshot solution

This commit is contained in:
coolneng 2020-04-29 02:50:17 +02:00
parent fabf20e303
commit 0480304036
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
3 changed files with 42 additions and 6 deletions

View File

@ -69,6 +69,7 @@
./modules/software.nix ./modules/software.nix
./modules/networking.nix ./modules/networking.nix
./modules/gui.nix ./modules/gui.nix
./modules/datasync.nix
]; ];
} }

33
modules/datasync.nix Normal file
View File

@ -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";
};
};
};
};
}

View File

@ -2,20 +2,20 @@
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Developement # Development
git lorri git direnv lorri
# Monitoring # Monitoring
htop htop
# Text editors # Text editors
neovim emacs neovim emacs
# Terminal multiplexing # Terminals
tmux tmuxp kitty tmux tmuxp
# Password management # Password management
pass passff-host pass-wayland passff-host gitAndTools.pass-git-helper
# Browsers # Browsers
firefox chromium firefox chromium
# LaTeX # LaTeX
tectonic pandoc texlive.combind.scheme-full pandoc pandoc-citeproc
]; ];
# Fonts declaration # Fonts declaration
@ -24,6 +24,8 @@
google-fonts google-fonts
siji siji
cherry cherry
iosevka
emacs.all-the-icons-fonts
]; ];
}; };