From 90aa6c93e2fb014c1093111bd309d87461853367 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Thu, 8 Oct 2020 23:17:44 +0200 Subject: nixos/snapper: add snapperd dbus service Since snapper 0.8.13 a systemd service is required for DBus activation. --- nixos/modules/services/misc/snapper.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'nixos/modules/services/misc/snapper.nix') diff --git a/nixos/modules/services/misc/snapper.nix b/nixos/modules/services/misc/snapper.nix index 6f3aaa973a0..3560d08520b 100644 --- a/nixos/modules/services/misc/snapper.nix +++ b/nixos/modules/services/misc/snapper.nix @@ -121,6 +121,16 @@ in services.dbus.packages = [ pkgs.snapper ]; + systemd.services.snapperd = { + description = "DBus interface for snapper"; + inherit documentation; + serviceConfig = { + Type = "dbus"; + BusName = "org.opensuse.Snapper"; + ExecStart = "${pkgs.snapper}/bin/snapperd"; + }; + }; + systemd.services.snapper-timeline = { description = "Timeline of Snapper Snapshots"; inherit documentation; -- cgit 1.4.1 From 6e65b724beb0de1a94089b55a95e2b683b56e587 Mon Sep 17 00:00:00 2001 From: Ales Huzik Date: Sun, 17 Jan 2021 19:13:34 +1100 Subject: 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(+) (limited to 'nixos/modules/services/misc/snapper.nix') diff --git a/nixos/modules/services/misc/snapper.nix b/nixos/modules/services/misc/snapper.nix index 3560d08520b..a821b9b6bf6 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 ''; }; }; -- cgit 1.4.1