44 lines
1.6 KiB
Nix
44 lines
1.6 KiB
Nix
{ lib, pkgs, desktop, ... }: {
|
|
environment.systemPackages = [ pkgs.snapper ] ++ lib.optional (builtins.isString desktop) pkgs.snapper-gui;
|
|
|
|
services.snapper = {
|
|
snapshotRootOnBoot = true;
|
|
cleanupInterval = "1h";
|
|
snapshotInterval = "hourly";
|
|
configs = {
|
|
root = {
|
|
TIMELINE_CREATE = true;
|
|
TIMELINE_CLEANUP = true;
|
|
TIMELINE_LIMIT_YEARLY = 0;
|
|
TIMELINE_LIMIT_QUARTERLY = 2;
|
|
TIMELINE_LIMIT_MONTHLY = 3;
|
|
TIMELINE_LIMIT_WEEKLY = 4;
|
|
TIMELINE_LIMIT_DAILY = 7;
|
|
TIMELINE_LIMIT_HOURLY = 24;
|
|
SUBVOLUME = "/";
|
|
};
|
|
home = {
|
|
TIMELINE_CREATE = true;
|
|
TIMELINE_CLEANUP = true;
|
|
TIMELINE_LIMIT_YEARLY = 0;
|
|
TIMELINE_LIMIT_QUARTERLY = 2;
|
|
TIMELINE_LIMIT_MONTHLY = 3;
|
|
TIMELINE_LIMIT_WEEKLY = 4;
|
|
TIMELINE_LIMIT_DAILY = 7;
|
|
TIMELINE_LIMIT_HOURLY = 24;
|
|
SUBVOLUME = "/home";
|
|
};
|
|
nix = {
|
|
TIMELINE_CREATE = true;
|
|
TIMELINE_CLEANUP = true;
|
|
TIMELINE_LIMIT_YEARLY = 0;
|
|
TIMELINE_LIMIT_QUARTERLY = 2;
|
|
TIMELINE_LIMIT_MONTHLY = 3;
|
|
TIMELINE_LIMIT_WEEKLY = 4;
|
|
TIMELINE_LIMIT_DAILY = 7;
|
|
TIMELINE_LIMIT_HOURLY = 24;
|
|
SUBVOLUME = "/nix";
|
|
};
|
|
};
|
|
};
|
|
}
|