diff options
| author | Michael Hoang <Enzime@users.noreply.github.com> | 2024-12-27 00:01:23 +1100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-27 00:01:23 +1100 |
| commit | bc03f7818771a75716966ce8c23110b715eff2aa (patch) | |
| tree | 6d8d61543818006a0804458eece9a55ac46c563d /modules/programs | |
| parent | a35b08d09efda83625bef267eb24347b446c80b8 (diff) | |
| parent | 2c86af2e996ac6abbf9e1711f36c28d33b328df6 (diff) | |
Merge pull request #1238 from Mic92/ssh
programs.ssh: add extraConfig option
Diffstat (limited to 'modules/programs')
| -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 |
