nix/nixos/common/services/snapper.nix
iFargle a64a8d0e6b
All checks were successful
deploy-rs / deploy-rs (push) Successful in 19s
Update disks
2023-12-25 16:06:25 +09:00

26 lines
No EOL
769 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 = "/root";
};
home = {
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
SUBVOLUME = "/home";
};
nix = {
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
SUBVOLUME = "/nix";
};
};
};
}