From c0a3d90d63bb5358f626223698ce4b21ee4a8696 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Wed, 28 Aug 2024 16:59:06 +0200 Subject: [PATCH] backups: add environmentFile option --- modules/backups/default.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/backups/default.nix b/modules/backups/default.nix index 5c286ef2..04b8324c 100644 --- a/modules/backups/default.nix +++ b/modules/backups/default.nix @@ -39,6 +39,15 @@ in example = "/etc/nixos/restic-password"; }; + environmentFile = mkOption { + type = with types; nullOr str; + default = null; + description = '' + Read repository secrets as environment variables from a file. + ''; + example = "/etc/nixos/restic-env"; + }; + repository = mkOption { type = with types; nullOr str; default = null; @@ -57,6 +66,7 @@ in remotebackup = { repository = "sftp:backup@host:/backups/home"; passwordFile = "/etc/nixos/secrets/restic-password"; + environmentFile = "/etc/nixos/secrets/restic-env"; }; }; };