nix-configs

Personal NixOS and home-manager configuration files
Log | Files | Refs

ssh.nix (1562B)


      1 { vars, ... }:
      2 
      3 {
      4   programs.ssh = {
      5     enable = true;
      6     enableDefaultConfig = false;
      7     settings = {
      8       "*" = {
      9         ForwardAgent = false;
     10         AddKeysToAgent = "no";
     11         Compression = false;
     12         ServerAliveInterval = 0;
     13         ServerAliveCountMax = 3;
     14         HashKnownHosts = false;
     15         UserKnownHostsFile = "~/.ssh/known_hosts";
     16         ControlMaster = "no";
     17         ControlPath = "~/.ssh/master-%r@%n:%p";
     18         ControlPersist = "no";
     19       };
     20       "tunnel" = {
     21         HostName = vars.user.domain;
     22         User = vars.user.username;
     23         Port = vars.secrets.sshport;
     24         IdentityFile = vars.secrets.privatekey;
     25         RemoteCommand = "ssh -p 55013 ${vars.user.username}@localhost -i ${vars.secrets.privatekey}";
     26         RequestTTY = "force";
     27       };
     28       "arcadia" = {
     29         HostName = "192.168.1.6";
     30         User = vars.user.username;
     31         Port = vars.secrets.sshport;
     32         IdentityFile = vars.secrets.privatekey;
     33       };
     34       "ilias" = {
     35         HostName = "192.168.1.3";
     36         User = vars.user.username;
     37         Port = vars.secrets.sshport;
     38         IdentityFile = vars.secrets.privatekey;
     39       };
     40       "router" = {
     41         HostName = "192.168.1.1";
     42         User = "root";
     43         Port = 22;
     44       };
     45       "ap" = {
     46         HostName = "192.168.1.2";
     47         User = "root";
     48         Port = 22;
     49       };
     50       "artemis" = {
     51         HostName = vars.user.domain;
     52         User = vars.user.username;
     53         Port = vars.secrets.sshport;
     54         IdentityFile = vars.secrets.privatekey;
     55       };
     56     };
     57   };
     58 }