2022-04-18 14:01:00 -05:00
|
|
|
{ lib, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
2024-10-03 11:26:39 -05:00
|
|
|
# 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
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
includes = [ "config.local" ];
|
2022-09-08 10:24:53 -05:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
matchBlocks =
|
|
|
|
|
let
|
|
|
|
|
nas = { user = "admin"; };
|
|
|
|
|
owned = { user = "greg"; };
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
inherit nas;
|
2022-11-10 08:22:42 -06:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
"*" = {
|
|
|
|
|
dynamicForwards = [{
|
|
|
|
|
port = 10240;
|
|
|
|
|
}];
|
|
|
|
|
};
|
2022-11-10 08:22:42 -06:00
|
|
|
|
2024-10-03 11:26:39 -05: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-03 11:26:39 -05:00
|
|
|
gh = { user = "git"; hostname = "github.com"; };
|
|
|
|
|
"src" = {
|
|
|
|
|
user = "gitlab";
|
|
|
|
|
hostname = "git.thehellings.lan";
|
|
|
|
|
};
|
2022-04-18 14:01:00 -05:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
"*.thehellings.lan" = owned;
|
|
|
|
|
"10.42.*" = owned;
|
2022-04-18 14:01:00 -05:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
"host.crosswire.org crosswire" = {
|
|
|
|
|
hostname = "host.crosswire.org";
|
|
|
|
|
user = "ghellings";
|
|
|
|
|
};
|
2022-04-18 14:01:00 -05:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
fedpeople = {
|
|
|
|
|
hostname = "fedorapeople.org";
|
|
|
|
|
user = "greghellings";
|
|
|
|
|
};
|
2022-04-18 14:01:00 -05:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
"src.fedoraproject.org pkgs.fedoraproject.org" = {
|
|
|
|
|
user = "greghellings";
|
|
|
|
|
};
|
2022-05-04 13:52:38 -05:00
|
|
|
|
2024-10-03 11:26:39 -05:00
|
|
|
"127.*".extraOptions = {
|
|
|
|
|
PubkeyAcceptedAlgorithms = "+ssh-rsa";
|
|
|
|
|
HostkeyAlgorithms = "+ssh-rsa";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-04-18 14:01:00 -05:00
|
|
|
}
|