vno1-oh2: pass ssh key to borg
This commit is contained in:
@@ -19,6 +19,7 @@ in {
|
||||
enable = lib.mkEnableOption "backup zfs snapshots with borg";
|
||||
|
||||
passwordPath = lib.mkOption {type = str;};
|
||||
sshKeyPath = lib.mkOption {type = nullOr path; default = null;};
|
||||
|
||||
mountpoints = lib.mkOption {
|
||||
default = {};
|
||||
@@ -86,6 +87,8 @@ in {
|
||||
}
|
||||
// lib.optionalAttrs (attrs ? patterns) {
|
||||
patterns = attrs.patterns;
|
||||
} // lib.optionalAttrs (config.mj.base.zfsborg.sshKeyPath != null) {
|
||||
environment.BORG_RSH = ''ssh -i "${config.mj.base.zfsborg.sshKeyPath}"'';
|
||||
};
|
||||
})
|
||||
config.mj.base.zfsborg.mountpoints;
|
||||
|
||||
Reference in New Issue
Block a user