Files
nixos/home/baseline/ssh.nix
T

91 lines
2.1 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";
2026-05-10 01:48:45 -05:00
onChange = "cat ~/.ssh/config_source > ~/.ssh/config && chmod 600 ~/.ssh/config";
};
programs.ssh = {
enable = true;
2022-04-18 14:01:00 -05:00
includes = [ "config.local" ];
2025-09-21 18:51:35 -05:00
enableDefaultConfig = false;
2022-09-08 10:24:53 -05:00
settings =
let
2024-10-19 01:19:59 -05:00
nas = {
User = "admin";
2024-10-19 01:19:59 -05:00
};
owned = {
User = "greg";
2024-10-19 01:19:59 -05:00
};
in
{
inherit nas;
2022-11-10 08:22:42 -06:00
"*" = {
DynamicForward = [ "10240" ];
2026-07-13 20:04:00 -05:00
ForwardAgent = "yes";
LogLevel = "error";
2026-07-13 20:04:00 -05:00
ServerAliveInterval = 60;
SetEnv = {
TERM = "xterm-256color";
};
};
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";
2024-10-19 01:19:59 -05:00
};
"src" = {
User = "git";
Hostname = "jeremiah.shire-zebra.ts.net";
Port = 32222;
};
2025-05-19 09:53:35 -05:00
srcpub = {
User = "git";
Hostname = "src.thehellings.com";
Port = 2222;
2025-05-19 09:53:35 -05:00
};
2024-10-21 09:18:51 -05:00
ivr = {
User = "git";
Hostname = "gitlab.com";
2024-10-21 09:18:51 -05:00
};
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";
2024-12-08 22:15:27 -06:00
};
"*.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.*" = {
PubkeyAcceptedAlgorithms = "+ssh-rsa";
HostkeyAlgorithms = "+ssh-rsa";
};
};
};
2022-04-18 14:01:00 -05:00
}