nixfiles/hosts/hetzner-vm/containers/matrix/profiles/restic.nix

18 lines
345 B
Nix
Raw Normal View History

2022-12-20 15:28:31 +00:00
{
pkgs,
config,
host_secrets,
...
}: let
secrets = host_secrets;
in {
environment.systemPackages = [
(pkgs.writeShellScriptBin "restic-matrix" ''
env \
RESTIC_PASSWORD_FILE=${secrets.matrix_restic_password.path} \
$(cat ${secrets.matrix_restic_env.path}) \
${pkgs.restic}/bin/restic $@
'')
];
}