Files
nixos/home/ssh.nix
T

66 lines
1.4 KiB
Nix
Raw Normal View History

2022-04-18 14:01:00 -05:00
{ lib, ... }:
{
2024-03-25 14:39:35 -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 400 ~/.ssh/config'';
};
2022-04-18 14:01:00 -05:00
programs.ssh = {
enable = true;
serverAliveInterval = 60;
2022-09-08 10:24:53 -05:00
includes = ["config.local"];
2022-04-18 14:01:00 -05:00
matchBlocks =
let
nas = { user = "admin"; };
owned = { user = "greg"; };
in {
2022-11-10 08:22:42 -06:00
inherit nas;
"*" = {
dynamicForwards = [ {
port = 10240;
} ];
};
2022-04-18 14:01:00 -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;
gh = { user = "git"; hostname = "github.com"; };
2023-12-24 13:18:29 -06:00
"src" = {
user = "gitlab";
hostname = "git.thehellings.lan";
port = 2222;
};
2022-04-18 14:01:00 -05:00
"*.thehellings.lan" = owned;
"10.42.*" = owned;
"host.crosswire.org crosswire" = {
hostname = "host.crosswire.org";
user = "ghellings";
};
fedpeople = {
hostname = "fedorapeople.org";
user = "greghellings";
};
"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
};
};
}