nix/nixos/common/services/snapper.nix

26 lines
765 B
Nix
Raw Normal View History

2023-12-12 14:26:36 +09:00
{ lib, pkgs, desktop, ... }: {
2023-12-12 14:49:35 +09:00
environment.systemPackages = [ pkgs.snapper ] ++ lib.optional (builtins.isString desktop) pkgs.snapper-gui;
services.snapper = {
snapshotRootOnBoot = true;
cleanupInterval = "1d";
snapshotInterval = "1h";
2023-12-24 11:02:20 +09:00
configs = {
root = {
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
2023-12-24 11:30:22 +09:00
SUBVOLUME = "/";
2023-12-24 11:02:20 +09:00
};
home = {
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
SUBVOLUME = "/home";
};
nix = {
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
SUBVOLUME = "/nix";
};
};
};
}