ninurta: create snapshots subvolumes for snapper

See also https://github.com/NixOS/nixpkgs/pull/78046
This commit is contained in:
Tim Schubert 2023-07-29 17:17:10 +02:00
parent 0d02c7ddd8
commit fae51f11c9
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA

View file

@ -212,6 +212,10 @@ in
systemd.tmpfiles.rules = [ systemd.tmpfiles.rules = [
"d /var/www/pruflas.uwu 0551 nginx nginx - -" "d /var/www/pruflas.uwu 0551 nginx nginx - -"
"d /mnt/storage/backups/ninurta 0750 ${config.users.users.borg.name} ${config.users.users.borg.group} - -" "d /mnt/storage/backups/ninurta 0750 ${config.users.users.borg.name} ${config.users.users.borg.group} - -"
"v /var/.snapshots 0755 root root - -"
"v /home/.snapshots 0755 root root - -"
"v /mnt/storage/.snapshots 0755 root root - -"
"v /mnt/storage/backups 0755 root root - -"
]; ];
age.secrets.${wg0PrivKey} = { age.secrets.${wg0PrivKey} = {
@ -236,6 +240,15 @@ in
services.snapper = { services.snapper = {
cleanupInterval = "1d"; cleanupInterval = "1d";
snapshotInterval = "hourly"; snapshotInterval = "hourly";
configs.home = {
SUBVOLUME = "/home";
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
TIMELINE_LIMIT_HOURLY = 24;
TIMELINE_LIMIT_DAILY = 13;
TIMELINE_LIMIT_WEEKLY = 6;
TIMELINE_LIMIT_MONTHLY = 3;
};
configs.var = { configs.var = {
SUBVOLUME = "/var"; SUBVOLUME = "/var";
TIMELINE_CREATE = true; TIMELINE_CREATE = true;