Enable btrfs snapshots for /home

This commit is contained in:
Jakob Lechner 2025-04-07 22:05:47 +02:00
parent 20b548c73d
commit 5e8e4671cd
2 changed files with 24 additions and 0 deletions

View file

@ -32,6 +32,27 @@
priority = 1;
};
services.snapper.configs = {
home = {
SUBVOLUME = "/home";
ALLOW_USERS = [ "jalr" ];
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
TIMELINE_LIMIT_HOURLY = 12;
TIMELINE_LIMIT_DAILY = 7;
TIMELINE_LIMIT_WEEKLY = 4;
TIMELINE_LIMIT_MONTHLY = 3;
TIMELINE_LIMIT_YEARLY = 0;
BACKGROUND_COMPARISON = "yes";
NUMBER_CLEANUP = "no";
NUMBER_MIN_AGE = "1800";
NUMBER_LIMIT = "100";
NUMBER_LIMIT_IMPORTANT = "10";
EMPTY_PRE_POST_CLEANUP = "yes";
EMPTY_PRE_POST_MIN_AGE = "1800";
};
};
jalr = {
bootloader = "lanzaboote";
bluetooth.enable = true;

View file

@ -38,6 +38,9 @@
mountpoint = "/home";
mountOptions = [ "compress-force=zstd:1" "noatime" "nodev" "nosuid" ];
};
"/home/.snapshots" = {
mountOptions = [ "compress-force=zstd:1" "noatime" "nodev" "nosuid" ];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress-force=zstd:1" "noatime" "noatime" "nodev" ];