diff options
| author | Jörg Thalheim <joerg@thalheim.io> | 2024-08-12 10:26:41 +0200 |
|---|---|---|
| committer | Jörg Thalheim <joerg@thalheim.io> | 2024-12-23 21:32:37 +0100 |
| commit | 2c86af2e996ac6abbf9e1711f36c28d33b328df6 (patch) | |
| tree | 6d8d61543818006a0804458eece9a55ac46c563d /modules/programs/ssh | |
| parent | a35b08d09efda83625bef267eb24347b446c80b8 (diff) | |
programs.ssh: add extraConfig option
Same interface as in NixOS. This is useful to apply configuration for remote builders.
Diffstat (limited to 'modules/programs/ssh')
| -rw-r--r-- | modules/programs/ssh/default.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/programs/ssh/default.nix b/modules/programs/ssh/default.nix index 51c7796..1e87732 100644 --- a/modules/programs/ssh/default.nix +++ b/modules/programs/ssh/default.nix @@ -114,6 +114,15 @@ in type = with types; attrsOf (submodule userOptions); }; + programs.ssh.extraConfig = lib.mkOption { + type = lib.types.lines; + default = ""; + description = '' + Extra configuration text loaded in {file}`ssh_config`. + See {manpage}`ssh_config(5)` for help. + ''; + }; + programs.ssh.knownHosts = mkOption { default = {}; type = types.attrsOf (types.submodule host); @@ -151,6 +160,7 @@ in + (if h.publicKey != null then h.publicKey else readFile h.publicKeyFile) )) + "\n"; }; + "ssh/ssh_config.d/100-nix-darwin.conf".text = config.programs.ssh.extraConfig; "ssh/sshd_config.d/101-authorized-keys.conf" = { text = '' # sshd doesn't like reading from symbolic links, so we cat |
