diff options
| author | Skullheadx <admonty1@protonmail.com> | 2026-06-01 21:52:21 -0400 |
|---|---|---|
| committer | Skullheadx <admonty1@protonmail.com> | 2026-06-01 21:58:33 -0400 |
| commit | 776dd620c8c87562980b9520c8730c3245fdf0b5 (patch) | |
| tree | 591343ed742d004d25c826b3739aff7e196328b9 /hosts | |
| parent | configure ssh (diff) | |
| download | nixos-776dd620c8c87562980b9520c8730c3245fdf0b5.tar.gz nixos-776dd620c8c87562980b9520c8730c3245fdf0b5.tar.bz2 nixos-776dd620c8c87562980b9520c8730c3245fdf0b5.zip | |
ssh known hosts
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/icon/configuration.nix | 21 | ||||
| -rw-r--r-- | hosts/nepsis/configuration.nix | 42 |
2 files changed, 46 insertions, 17 deletions
diff --git a/hosts/icon/configuration.nix b/hosts/icon/configuration.nix index e8862cd..8261edf 100644 --- a/hosts/icon/configuration.nix +++ b/hosts/icon/configuration.nix @@ -9,6 +9,23 @@ ./../../vim.nix ]; + programs.ssh = { + knownHosts = { + desktop = { + extraHostNames = ["192.168.1.122"]; + publicKeyFile = ./../../pubkeys/desktop_ssh.pub; + }; + vps = { + extraHostNames = ["170.205.37.7"]; + publicKeyFile = ./../../pubkeys/vps_ssh.pub; + }; + github = { + extraHostNames = ["github.com"]; + publicKeyFile = ./../../pubkeys/github_ssh.pub; + }; + }; + }; + users.groups.git = {}; users.users.nginx.extraGroups = ["git"]; systemd.services.nginx.serviceConfig = { @@ -34,9 +51,7 @@ home = "/srv/git"; createHome = true; homeMode = "755"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPfIZMlXeTEi0YoOq36WNo6xPoolqvoS77ygtKaySkoG admonty1@protonmail.com" - ]; + openssh.authorizedKeys.keyFiles = [../../pubkeys/desktop_ssh.pub]; }; }; diff --git a/hosts/nepsis/configuration.nix b/hosts/nepsis/configuration.nix index bfff0bd..e5d503d 100644 --- a/hosts/nepsis/configuration.nix +++ b/hosts/nepsis/configuration.nix @@ -17,6 +17,34 @@ networking.hostName = "nepsis"; # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + programs.ssh = { + knownHosts = { + homelab = { + extraHostNames = ["192.168.1.120"]; + publicKeyFile = ./../../pubkeys/homelab_ssh.pub; + }; + vps = { + extraHostNames = ["170.205.37.7"]; + publicKeyFile = ./../../pubkeys/vps_ssh.pub; + }; + github = { + extraHostNames = ["github.com"]; + publicKeyFile = ./../../pubkeys/github_ssh.pub; + }; + }; + extraConfig = '' + Host git-vps + HostName git.skullheadx.com + Port 2222 + User git + Host git.skullheadx.com + HostName localhost + Port 2223 + User git + ProxyJump git-vps + ''; + }; + # Configure network proxy if necessary # networking.proxy.default = "http://user:password@proxy:port/"; # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; @@ -63,20 +91,6 @@ }; }; - programs.ssh = { - extraConfig = '' - Host git-vps - HostName git.skullheadx.com - Port 2222 - User git - Host git.skullheadx.com - HostName localhost - Port 2223 - User git - ProxyJump git-vps - ''; - }; - programs.steam = { enable = true; remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play |
