Snapper: switch to new format

This commit is contained in:
Filippo Berto 2023-06-05 15:01:23 +02:00
parent 2059cca253
commit 3df5b1149a
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
2 changed files with 17 additions and 28 deletions

View file

@ -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" ];
};
};
};