1
0

Compare commits

..

2 Commits

Author SHA1 Message Date
80cc6522da hosts/krypton: enable backup 2023-06-20 20:36:53 +02:00
26f05a217b modules/backup: allow exclusion of paths 2023-06-20 20:35:37 +02:00
8 changed files with 42 additions and 1 deletions

25
hosts/krypton/backup.nix Normal file
View File

@ -0,0 +1,25 @@
{ ... }:
{
clerie.backup = {
enable = true;
jobs.main = {
paths = [
"/home"
"/var/lib"
];
exclude = [
"/home/*/.local/share/Trash/"
"/home/*/.config/*.log"
"/home/*/.local/*.log"
"/home/*/.cache/"
"/home/*/.config/*[Cc]ache*/"
"/home/*/.mozilla/*/cache/"
"/home/*/.thumbnails/"
"/home/clerie/tmp/"
"/home/clere/Downloads/"
];
};
};
}

View File

@ -7,6 +7,7 @@
../../configuration/desktop
./backup.nix
./network.nix
./programs.nix
];

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,11 @@
age-encryption.org/v1
-> ssh-ed25519 HwR33w VDZ3mtQaW1MsXQ6gan2Xcfv4/8IHHdMsPqCZDuauPEE
WSUmbw8NXcgkJf06iNFGsx7tNiVt7VAnynqroRymbkU
-> ssh-ed25519 xvh52g ie1NcuCJIJrPX4oklSLXEoxd6YmapsbOr4wf6TrJYEM
lx5xuRHZXXG1YuYoDUlvPZxxtfDE1Sv/aStz53mJ4nI
-> ,TT@-grease 6JH, x4O9 $E$9`?` &
pd1+tQGZkVIl7xbEsdJw9zQiNjy2/83PF+uAaekiLTolgHXmPWIp70ZsL6oHA/G6
y1JOCL9l03GSgbpx
--- Lv/Xf3QnA523yOR63Gugq9mvfen5+YR2OYwGEim59B4
¼JM«°@gû&V<|ôŸ®fšÑ<l
V{¥àتš¸2~i.úªÌ1´á¬<C3A1>ŠžgÌRb©NÇŽòe¿Œ9NdßüÚÝ|F%](_À|

View File

@ -43,7 +43,7 @@ let
restic snapshots || restic init
restic backup ${escapeShellArgs jobOptions.paths}
restic backup ${optionalString (jobOptions.exclude != []) (pkgs.writeText "clerie-backup-${jobName}-${targetName}-excludes" (concatStringsSep "\n" jobOptions.exclude))} ${escapeShellArgs jobOptions.paths}
restic check
@ -96,6 +96,10 @@ let
paths = mkOption {
type = with types; listOf str;
};
exclude = mkOption {
type = with types; listOf str;
default = [];
};
};
};
in