From 3df5b1149a5b0c4254614816bc1f8b5d6d1060b8 Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Mon, 5 Jun 2023 15:01:23 +0200 Subject: [PATCH] Snapper: switch to new format --- loki/configuration.nix | 35 +++++++++++++---------------------- thor/configuration.nix | 10 ++++------ 2 files changed, 17 insertions(+), 28 deletions(-) diff --git a/loki/configuration.nix b/loki/configuration.nix index 2ea7811..1e92074 100644 --- a/loki/configuration.nix +++ b/loki/configuration.nix @@ -240,32 +240,23 @@ with lib; { services.snapper = { configs = let - commonExtraConfig = '' - TIMELINE_CREATE=yes - TIMELINE_CLEANUP=yes - ''; + common = { + TIMELINE_CREATE = true; + TIMELINE_CLEANUP = true; + }; in { - bertof = { - subvolume = "/home/bertof/"; - extraConfig = '' - ALLOW_USERS="bertof" - ${commonExtraConfig} - ''; + bertof = recursiveUpdate common { + SUBVOLUME = "/home/bertof/"; + ALLOW_USERS = [ "bertof" ]; }; - tiziano = { - subvolume = "/home/tiziano/"; - extraConfig = '' - ALLOW_USERS="tiziano" - ${commonExtraConfig} - ''; + tiziano = recursiveUpdate common { + SUBVOLUME = "/home/tiziano/"; + ALLOW_USERS = [ "tiziano" ]; }; - condiviso = { - subvolume = "/mnt/condiviso"; - extraConfig = '' - ALLOW_USERS="bertof tiziano" - ${commonExtraConfig} - ''; + condiviso = recursiveUpdate common { + SUBVOLUME = "/mnt/condiviso"; + ALLOW_USERS = [ "bertof" "tiziano" ]; }; }; }; diff --git a/thor/configuration.nix b/thor/configuration.nix index df56ece..89b3b6e 100644 --- a/thor/configuration.nix +++ b/thor/configuration.nix @@ -131,15 +131,13 @@ with lib; { configs = let common = { - extraConfig = '' - ALLOW_USERS="bertof" - TIMELINE_CREATE=yes - TIMELINE_CLEANUP=yes - ''; + ALLOW_USERS = [ "bertof" ]; + TIMELINE_CLEANUP = true; + TIMELINE_CREATE = true; }; in { - bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; }; + bertof_home = recursiveUpdate common { SUBVOLUME = "/home/bertof"; }; }; }; thermald.enable = true;