nix/nixos/common/services/snapper.nix
iFargle 82b80cf360
All checks were successful
ssh-test / ssh-test (push) Successful in 24s
Update snapper
2023-12-24 11:30:22 +09:00

26 lines
No EOL
765 B
Nix

{ lib, pkgs, desktop, ... }: {
environment.systemPackages = [ pkgs.snapper ] ++ lib.optional (builtins.isString desktop) pkgs.snapper-gui;
services.snapper = {
snapshotRootOnBoot = true;
cleanupInterval = "1d";
snapshotInterval = "1h";
configs = {
root = {
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
SUBVOLUME = "/";
};
home = {
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
SUBVOLUME = "/home";
};
nix = {
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
SUBVOLUME = "/nix";
};
};
};
}