From ca63f12fc6ba869fca4891f5ac350d8c7e2af6e6 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Fri, 20 Sep 2024 17:49:52 -0700 Subject: system: ssh managed by home manager --- home/ebisu/fortune/system/default.nix | 1 + home/ebisu/fortune/system/ssh.nix | 46 +++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 home/ebisu/fortune/system/ssh.nix (limited to 'home') diff --git a/home/ebisu/fortune/system/default.nix b/home/ebisu/fortune/system/default.nix index 5657679..cf8279a 100644 --- a/home/ebisu/fortune/system/default.nix +++ b/home/ebisu/fortune/system/default.nix @@ -7,6 +7,7 @@ ./terminal ./virtualisation ./peripheral.nix + ./ssh.nix ./tracing.nix ./variables.nix ./xdg.nix diff --git a/home/ebisu/fortune/system/ssh.nix b/home/ebisu/fortune/system/ssh.nix new file mode 100644 index 0000000..fec6891 --- /dev/null +++ b/home/ebisu/fortune/system/ssh.nix @@ -0,0 +1,46 @@ +{ config, secrets, ... }: +{ + programs.ssh = { + enable = true; + addKeysToAgent = "yes"; + serverAliveInterval = 60; + serverAliveCountMax = 10; + + extraConfig = '' + IgnoreUnknown UseKeychain + UseKeychain yes + IPQoS lowdelay throughput + ''; + + matchBlocks = { + "watson".user = "root"; + "fina".hostname = "192.168.1.215"; + "himeji".user = "root"; + + "github.com" = { + user = "git"; + identityFile = "${config.home.homeDirectory}/.ssh/id_rsa"; + }; + + "aur.archlinux.org" = { + user = "aur"; + identityFile = "${config.home.homeDirectory}/.ssh/aur"; + }; + + "seti" = { + user = "root"; + port = 2222; + identityFile = "${config.home.homeDirectory}/.ssh/seti"; + }; + + "oit" = { + inherit (secrets.ssh.oit) hostname user; + }; + + "eu.nixbuild.net" = { + port = 2222; + identityFile = "${config.home.homeDirectory}/.ssh/id_ed25519.1"; + }; + }; + }; +} -- cgit v1.2.3