From 6e65b724beb0de1a94089b55a95e2b683b56e587 Mon Sep 17 00:00:00 2001 From: Ales Huzik Date: Sun, 17 Jan 2021 19:13:34 +1100 Subject: [PATCH] nixos/snapper: improve config example In the default configuration we have timers for creating and deleting snapper snapshots, and it looks like if we just create configs with correct mountpoints we will get automatic snapshots (which either used to be true, or seems to be only true on Archlinux according to their wiki). In default snapper configuration TIMELINE_CREATE and TIMELINE_CLEANUP are set to "no", so just providing configs won't be enough for having automatic backups, which are the main usecase for snapper. In other linux distributions you would use `snapper create-config` to generate configs for partitions and you'd have a chance to notice that TIMELINE_CREATE is set to no. Also, my guess is that it might be set to no by default for safety reasons in regular distros, so that the config won't be actioned upon until the user finishes customizing it. --- nixos/modules/services/misc/snapper.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/misc/snapper.nix b/nixos/modules/services/misc/snapper.nix index 3560d08520b7..a821b9b6bf65 100644 --- a/nixos/modules/services/misc/snapper.nix +++ b/nixos/modules/services/misc/snapper.nix @@ -48,6 +48,8 @@ in subvolume = "/home"; extraConfig = '' ALLOW_USERS="alice" + TIMELINE_CREATE=yes + TIMELINE_CLEANUP=yes ''; }; };