Commit graph

15 commits

Author SHA1 Message Date
dsx 0312cb611e
ssh: add addressFamily option
(cherry picked from commit 6ce3ce69b9)
2018-12-06 00:32:52 +01:00
Robert Helgesson 3b7f74ab87
ssh: add certificateFile option
(cherry picked from commit 6826521ec5)
2018-12-06 00:32:52 +01:00
Robert Helgesson c9945550de
ssh: realign options
(cherry picked from commit 5fe62660aa)
2018-12-06 00:32:52 +01:00
zimbatm b535770bd4
ssh: tweak default controlPath
Instead of using the hostname `%h`, which can be changed by the
~/.ssh/config file, use the commandline-given hostname `%n`.

This allows to alias a host with different hostnames, which then point
to different configurations. A common use-case for this is if you have
multiple accounts on github with each access to different private repos:

    Host github.com
      IdentitiesOnly yes
      User git
      IdentityFile ~/.ssh/id_rsa

    Host customer.github.com
      IdentitiesOnly yes
      User git
      IdentityFile ~/.ssh/customer
      HostName github.com

Without this change, if a connection was established with the first
github.com alias, then the user would try to pull a repo from the second
account, ssh would re-use the SSH connection which doesn't have access
to that repository.

(cherry picked from commit 40b279e3a3)
2018-12-06 00:31:53 +01:00
zimbatm 456e2d7ed5
ssh: add more options 2018-11-25 22:46:06 +01:00
Robert Helgesson 4205c91609
ssh: move options to end of configuration file
This is needed to support overriding these options inside match
blocks. A new option `programs.ssh.extraOptionOverrides` has been
added to allow global overrides.
2018-03-25 08:51:20 +02:00
Robert Helgesson 32b3f7f2d2
ssh: allow disabling compression in host block
Fixes #181.
2018-01-14 22:08:31 +01:00
John Wiegley b8b595c6b2
ssh: add a few more options 2018-01-13 12:47:30 +01:00
Nadrieril d6ab6ee370
ssh: add extraConfig option for non-standard options 2018-01-10 22:24:03 +01:00
Robert Helgesson a8e08d14bb
Mark rycee as maintainer for a bunch of modules 2017-09-26 23:40:31 +02:00
Silvan Mosberger fc1d4f5362
ssh: allow attrset matchBlock 2017-09-12 08:54:18 +02:00
Robert Helgesson be432c8654
ssh: add control persist option 2017-07-29 17:47:18 +02:00
Robert Helgesson ecf7d91d8b
ssh: use types.str instead of types.string
The `types.string` type is deprecated due to its surprising behavior.
2017-05-13 12:23:59 +02:00
Robert Helgesson 961722c3a8
ssh: add proxy command option 2017-05-13 12:08:09 +02:00
Christopher League bce262e46e
ssh: add programs.ssh module
This module generates a `.ssh/config` file. This doesn't embed _all_
options for the ssh client, but the most common ones should be there.

Example usage:

```nix
  programs.ssh = {
    enable = true;
    forwardAgent = true;
    controlMaster = "auto";
    matchBlocks = [
      {
        host = "something.blah.edu";
        port = 1024;
        user = "cleague";
        identitiesOnly = true;
      }
      {
        host = "host1 host2 host2.net host2.com";
        port = 7422;
        hostname = "example.com";
        serverAliveInterval = 60;
      }
      {
        host = "lucian";
        forwardX11 = true;
        forwardX11Trusted = true;
        checkHostIP = false;
      };
    };
  };
```

Each entry in `programs.ssh.matchBlocks` must contain a `host` field,
which will be used for the block condition.
2017-05-13 11:41:38 +02:00