diff --git a/noah-home.nix b/noah-home.nix index dcb09aa..7b22728 100644 --- a/noah-home.nix +++ b/noah-home.nix @@ -130,107 +130,11 @@ in enable = true; package = unstable.aerc; }; - programs.ssh.enable = true; - programs.ssh.extraConfig = '' - AddKeysToAgent yes - ServerAliveInterval 60 - ControlMaster auto - ControlPath ~/.ssh/master-%r@%h:%p - - Host home - Hostname packetlostandfound.us - User noah - IdentityFile ~/.ssh/id_ed25519 - IdentitiesOnly yes - - Host git.sr.ht - HostName git.sr.ht - User git - IdentityFile ~/.ssh/id_ed25519 - - Host github.com - HostName github.com - User git - IdentityFile ~/.ssh/id_ed25519 - - Host misaki - HostName 192.168.1.3 - User noah - IdentityFile ~/.ssh/id_ed25519 - ForwardAgent yes - - Host komoe - HostName 192.168.1.5 - User noah - IdentityFile ~/.ssh/id_ed25519 - ForwardAgent yes - - Host sdf - HostName tty.sdf.org - User ngp - IdentityFile ~/.ssh/id_ed25519 - - Host tildeclub - HostName tilde.club - User ngp - IdentityFile ~/.ssh/id_ed25519 - - Host envs - HostName envs.net - User ngp - IdentityFile ~/.ssh/id_ed25519 - - Host tildeteam - HostName tilde.team - User ngp - IdentityFile ~/.ssh/id_ed25519 - - Host ctrl-c - HostName ctrl-c.club - User ngp - IdentityFile ~/.ssh/id_ed25519 - - Host tildetown - HostName tilde.town - User ngp - IdentityFile ~/.ssh/id_ed25519 - - Host yourtilde - HostName yourtilde.com - User ngp - IdentityFile ~/.ssh/id_ed25519 - - Host hashbang - HostName to1.hashbang.sh - IdentitiesOnly yes - User ngp - IdentityFile ~/.ssh/id_ed25519 - - Host tiny - HostName tiny.packetlost.dev - User noah - IdentityFile ~/.ssh/id_ed25519 - - Host tinybsd - HostName tinybsd.packetlost.dev - User noah - IdentityFile ~/.ssh/id_ed25519 - - Host seedbox - HostName canopus.usbx.me - User ngp - IdentityFile ~/.ssh/id_ed25519 - - Host saten - HostName saten.packetlost.dev - User noah - IdentityFile ~/.ssh/id_ed25519 - - Host launchpad - HostName git.launchpad.net - User pedersonnoah - IdentityFile ~/.ssh/id_ed25519 - ''; + programs.ssh = { + enable = true; + extraConfig = builtins.readFile ./ssh/extra; + }; + services.ssh-agent.enable = true; programs.direnv = { enable = true; diff --git a/ssh/extra b/ssh/extra new file mode 100644 index 0000000..fef4668 --- /dev/null +++ b/ssh/extra @@ -0,0 +1,98 @@ +AddKeysToAgent yes +ServerAliveInterval 60 +ControlMaster auto +ControlPath ~/.ssh/master-%r@%h:%p + +Host home + Hostname packetlostandfound.us + User noah + IdentityFile ~/.ssh/id_ed25519 + IdentitiesOnly yes + +Host git.sr.ht + HostName git.sr.ht + User git + IdentityFile ~/.ssh/id_ed25519 + +Host github.com + HostName github.com + User git + IdentityFile ~/.ssh/id_ed25519 + +Host misaki + HostName 192.168.1.3 + User noah + IdentityFile ~/.ssh/id_ed25519 + ForwardAgent yes + +Host komoe + HostName 192.168.1.5 + User noah + IdentityFile ~/.ssh/id_ed25519 + ForwardAgent yes + +Host sdf + HostName tty.sdf.org + User ngp + IdentityFile ~/.ssh/id_ed25519 + +Host tildeclub + HostName tilde.club + User ngp + IdentityFile ~/.ssh/id_ed25519 + +Host envs + HostName envs.net + User ngp + IdentityFile ~/.ssh/id_ed25519 + +Host tildeteam + HostName tilde.team + User ngp + IdentityFile ~/.ssh/id_ed25519 + +Host ctrl-c + HostName ctrl-c.club + User ngp + IdentityFile ~/.ssh/id_ed25519 + +Host tildetown + HostName tilde.town + User ngp + IdentityFile ~/.ssh/id_ed25519 + +Host yourtilde + HostName yourtilde.com + User ngp + IdentityFile ~/.ssh/id_ed25519 + +Host hashbang + HostName to1.hashbang.sh + IdentitiesOnly yes + User ngp + IdentityFile ~/.ssh/id_ed25519 + +Host tiny + HostName tiny.packetlost.dev + User noah + IdentityFile ~/.ssh/id_ed25519 + +Host tinybsd + HostName tinybsd.packetlost.dev + User noah + IdentityFile ~/.ssh/id_ed25519 + +Host seedbox + HostName canopus.usbx.me + User ngp + IdentityFile ~/.ssh/id_ed25519 + +Host saten + HostName saten.packetlost.dev + User noah + IdentityFile ~/.ssh/id_ed25519 + +Host launchpad + HostName git.launchpad.net + User pedersonnoah + IdentityFile ~/.ssh/id_ed25519