1
0
mirror of https://github.com/tboerger/nixos-config synced 2025-02-22 23:31:08 +01:00
github.com-tboerger-nixos-c.../profiles/thomas/programs/ssh.nix
2024-11-24 16:13:14 +01:00

66 lines
1.5 KiB
Nix

{ pkgs, lib, config, options, ... }:
with lib;
let
cfg = config.profile.programs.ssh;
in
{
options = {
profile = {
programs = {
ssh = {
enable = mkEnableOption "Ssh";
};
};
};
};
config = mkIf cfg.enable {
programs = {
ssh = {
enable = true;
forwardAgent = true;
matchBlocks = {
"yggdrasil" = {
hostname = "192.168.1.5";
port = 22;
user = "thomas";
};
"asgard" = {
hostname = "192.168.1.10";
port = 22;
user = "thomas";
};
"utgard" = {
hostname = "192.168.1.11";
port = 22;
user = "thomas";
};
"vanaheim" = {
hostname = "vanaheim-boerger.ws";
port = 22;
user = "thomas";
};
"jumphost1.cloudpunks.io" = {
user = "tboerger";
forwardAgent = true;
};
"*.cloudopserve.io !jumphost1.cloudpunks.io" = lib.hm.dag.entryAfter [ "jumphost1.cloudpunks.io" ] {
user = "oper";
forwardAgent = true;
proxyJump = "tboerger@jumphost1.cloudpunks.io";
};
"*.cloudpunks.io !jumphost1.cloudpunks.io" = lib.hm.dag.entryAfter [ "jumphost1.cloudpunks.io" ] {
user = "oper";
forwardAgent = true;
proxyJump = "tboerger@jumphost1.cloudpunks.io";
};
};
};
};
};
}