Skip to content

Instantly share code, notes, and snippets.

@jevy
Last active February 15, 2022 00:09
Show Gist options
  • Save jevy/4230a3cf670762cb110c2aa65b51bb65 to your computer and use it in GitHub Desktop.
Save jevy/4230a3cf670762cb110c2aa65b51bb65 to your computer and use it in GitHub Desktop.
Duplicity Backup
with import <nixpkgs> {};
let
duplicity_backupsh = fetchFromGitHub {
owner = "zertrin";
repo = "duplicity-backup.sh";
rev = "595aded06f96d91cbe44662712f6e5614ce89220";
sha256 = "1xzmz7fcr3vjcxhbjla3kvc49g3xgbs065pjd167jfqvgxj51m7l";
};
config = pkgs.writeTextFile {
name = "config";
text = builtins.readFile ./duplicity-backup.conf;
};
in
pkgs.writeShellApplication {
name = "duplicity_backup";
runtimeInputs = [ duplicity nawk jq];
text = ''
${duplicity_backupsh}/duplicity-backup.sh -c ${config} -b
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment