Compare commits

...

3 commits

Author SHA1 Message Date
Jeffrey C. Ollie
210af3b949
cleanup 2023-03-30 15:50:55 -05:00
Jeffrey C. Ollie
9367bd0267
Merge branch 'main' of git.ocjtech.us:jeff/nixos-restic 2023-03-30 15:43:21 -05:00
Jeffrey C. Ollie
cb0e49e5d6
add pre/post command 2023-03-30 15:40:02 -05:00

View file

@ -95,7 +95,6 @@
"azure"
"b2"
];
# default = "b2";
};
healthcheck = lib.options.mkOption {
type = lib.types.submodule {
@ -160,6 +159,14 @@
paths = lib.options.mkOption {
type = lib.types.listOf lib.types.str;
};
preCommand = lib.options.mkOption {
type = lib.types.lines;
default = "";
};
postCommand = lib.options.mkOption {
type = lib.types.lines;
default = "";
};
};
}
);
@ -314,7 +321,13 @@
backup.excludes;
paths = lib.strings.concatStringsSep " " backup.paths;
in
"${package}/bin/restic backup${one-file-system}${excludes} ${paths}"
''
${backup.preCommand}
${package}/bin/restic backup${one-file-system}${excludes} ${paths}
${backup.postCommand}
''
)
cfg.backups
);