add snapper
This commit is contained in:
parent
34ce469784
commit
ce0954fc61
3 changed files with 25 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
./networking.nix
|
./networking.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./security.nix
|
./security.nix
|
||||||
|
./snapper.nix
|
||||||
|
|
||||||
../../users/rin
|
../../users/rin
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,12 @@
|
||||||
options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=260" ];
|
options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=260" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/home/.snapshots" =
|
||||||
|
{ device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=319" ];
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/root" =
|
fileSystems."/root" =
|
||||||
{ device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d";
|
{ device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
|
|
|
||||||
18
hosts/winter/snapper.nix
Normal file
18
hosts/winter/snapper.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ config, lib, ... }: {
|
||||||
|
services.snapper = {
|
||||||
|
configs.home = {
|
||||||
|
fstype = "btrfs";
|
||||||
|
subvolume = "/home";
|
||||||
|
extraConfig = lib.concatStringsSep "\n" (lib.mapAttrsToList (k: v: "${k}=${v}") {
|
||||||
|
TIMELINE_CLEANUP = "yes";
|
||||||
|
TIMELINE_CREATE = "yes";
|
||||||
|
TIMELINE_MIN_AGE = "1800";
|
||||||
|
TIMELINE_LIMIT_HOURLY = "5";
|
||||||
|
TIMELINE_LIMIT_DAILY = "7";
|
||||||
|
TIMELINE_LIMIT_WEEKLY = "0";
|
||||||
|
TIMELINE_LIMIT_MONTHLY = "0";
|
||||||
|
TIMELINE_LIMIT_YEARLY = "0";
|
||||||
|
});
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue