nixos/ssh: include systemd-ssh-proxy config
This commit is contained in:
@@ -49,6 +49,15 @@ in
|
||||
description = "Whether to configure SSH_ASKPASS in the environment.";
|
||||
};
|
||||
|
||||
systemd-ssh-proxy.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable systemd's ssh proxy plugin.
|
||||
See {manpage}`systemd-ssh-proxy(1)`.
|
||||
'';
|
||||
};
|
||||
|
||||
askPassword = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
|
||||
@@ -332,6 +341,11 @@ in
|
||||
# Custom options from `extraConfig`, to override generated options
|
||||
${cfg.extraConfig}
|
||||
|
||||
${lib.optionalString cfg.systemd-ssh-proxy.enable ''
|
||||
# See systemd-ssh-proxy(1)
|
||||
Include ${config.systemd.package}/lib/systemd/ssh_config.d/20-systemd-ssh-proxy.conf
|
||||
''}
|
||||
|
||||
# Generated options from other settings
|
||||
Host *
|
||||
GlobalKnownHostsFile ${builtins.concatStringsSep " " knownHostsFiles}
|
||||
|
||||
Reference in New Issue
Block a user