summaryrefslogtreecommitdiffstats
path: root/nixos/modules
diff options
context:
space:
mode:
authorAles Huzik <ahuzik@atlassian.com>2021-01-17 19:13:34 +1100
committerAles Huzik <ahuzik@atlassian.com>2021-01-17 19:13:35 +1100
commit6e65b724beb0de1a94089b55a95e2b683b56e587 (patch)
tree7f5f2f3ff5336cd259437a6ddc25dd52403eb241 /nixos/modules
parentb3616bd96400ce0252c241d76fcafb64389defc6 (diff)
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.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/misc/snapper.nix2
1 files changed, 2 insertions, 0 deletions
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
'';
};
};