Files
nixos/home/baseline/ssh.nix
T

84 lines
2.0 KiB
Nix
Raw Normal View History

2022-04-18 14:01:00 -05:00
{ lib, ... }:
{
# Workaround to set the config value to user read-only
# This allows things like SSH in distrobox to read the config file just fine
home.file.".ssh/config" = {
target = ".ssh/config_source";
onChange = ''cat ~/.ssh/config_source > ~/.ssh/config && chmod 600 ~/.ssh/config'';
};
programs.ssh = {
enable = true;
serverAliveInterval = 60;
2022-04-18 14:01:00 -05:00
includes = [ "config.local" ];
2022-09-08 10:24:53 -05:00
matchBlocks =
let
2024-10-19 01:19:59 -05:00
nas = {
user = "admin";
};
owned = {
user = "greg";
};
in
{
inherit nas;
2022-11-10 08:22:42 -06:00
"*" = {
2024-10-19 01:19:59 -05:00
dynamicForwards = [ { port = 10240; } ];
};
2022-11-10 08:22:42 -06:00
"10.42.1.4" = lib.hm.dag.entryBefore [ "10.42.*" ] nas;
"nas.thehellings.lan" = nas;
"nas.greg-hellings.gmail.com.beta.tailscale.net" = nas;
chronicles = nas;
"chronicles.thehellings.lan" = lib.hm.dag.entryBefore [ "*.thehellings.lan" ] nas;
2022-04-18 14:01:00 -05:00
2024-10-19 01:19:59 -05:00
gh = {
user = "git";
hostname = "github.com";
};
"src" = {
user = "gitlab";
2025-06-12 04:45:03 +00:00
hostname = "vm-gitlab.shire-zebra.ts.net";
};
2025-05-19 09:53:35 -05:00
srcpub = {
user = "gitlab";
hostname = "src.thehellings.com";
port = 2222;
};
2024-10-21 09:18:51 -05:00
ivr = {
user = "git";
hostname = "gitlab.com";
};
2022-04-18 14:01:00 -05:00
2024-12-08 22:15:27 -06:00
"ivr.thehellings.lan" = lib.hm.dag.entryBefore [ "ivr" ] {
user = "gregory.hellings";
};
"*.thehellings.lan" = owned;
"10.42.*" = owned;
2022-04-18 14:01:00 -05:00
"host.crosswire.org crosswire" = {
hostname = "host.crosswire.org";
user = "ghellings";
};
2022-04-18 14:01:00 -05:00
fedpeople = {
hostname = "fedorapeople.org";
user = "greghellings";
};
2022-04-18 14:01:00 -05:00
"src.fedoraproject.org pkgs.fedoraproject.org" = {
user = "greghellings";
};
2022-05-04 13:52:38 -05:00
"127.*".extraOptions = {
PubkeyAcceptedAlgorithms = "+ssh-rsa";
HostkeyAlgorithms = "+ssh-rsa";
};
};
};
2022-04-18 14:01:00 -05:00
}