18 lines
345 B
Nix
18 lines
345 B
Nix
{
|
|
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 $@
|
|
'')
|
|
];
|
|
}
|