Factor out ssh module

This commit is contained in:
Nathan McCarty 2023-05-11 11:31:17 -04:00
parent 86394b692c
commit 8dd5a33171
No known key found for this signature in database
4 changed files with 67 additions and 60 deletions

View File

@ -67,66 +67,6 @@ with lib; {
tmate
];
})
(mkIf config.nathan.programs.util.ssh {
#########################
## SSH Configuration
#########################
programs.ssh = {
# SSH configuration
enable = true;
# extra config to set the ciphers
extraConfig = ''
Ciphers aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
'';
# Enable compression
compression = true;
# enable session reuse
controlMaster = "auto";
controlPersist = "10m";
# Configure known hosts
matchBlocks = {
"levitation" = {
forwardAgent = true;
user = "nathan";
hostname = "100.95.223.6";
};
"perception" = {
forwardAgent = true;
user = "nathan";
hostname = "100.121.150.78";
};
"oracles" = {
forwardAgent = true;
user = "nathan";
hostname = "100.66.15.34";
};
"tounge" = {
forwardAgent = true;
user = "nathan";
hostname = "100.75.37.98";
};
"shadowchild" = {
forwardAgent = true;
user = "nathan";
hostname = "172.23.217.149";
};
"matrix.community.rs" = {
forwardAgent = true;
user = "nathan";
hostname = "100.113.74.107";
};
"fusion" = {
forwardAgent = true;
user = "nathan";
hostname = "100.99.69.14";
};
"de1955" = {
user = "de1955";
hostname = "de1955.rsync.net";
};
};
};
})
(mkIf config.nathan.programs.util.fish {
#########################
## Fish Configuration

View File

@ -0,0 +1,65 @@
{ config, lib, pkgs, inputs, ... }:
with lib; {
config = mkMerge [
(mkIf config.nathan.programs.util.ssh {
#########################
## SSH Configuration
#########################
programs.ssh = {
# SSH configuration
enable = true;
# extra config to set the ciphers
extraConfig = ''
Ciphers aes128-gcm@openssh.com,aes256-gcm@openssh.com,chacha20-poly1305@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
'';
# Enable compression
compression = true;
# enable session reuse
controlMaster = "auto";
controlPersist = "10m";
# Configure known hosts
matchBlocks = {
"levitation" = {
forwardAgent = true;
user = "nathan";
hostname = "100.95.223.6";
};
"perception" = {
forwardAgent = true;
user = "nathan";
hostname = "100.121.150.78";
};
"oracles" = {
forwardAgent = true;
user = "nathan";
hostname = "100.66.15.34";
};
"tounge" = {
forwardAgent = true;
user = "nathan";
hostname = "100.75.37.98";
};
"shadowchild" = {
forwardAgent = true;
user = "nathan";
hostname = "172.23.217.149";
};
"matrix.community.rs" = {
forwardAgent = true;
user = "nathan";
hostname = "100.113.74.107";
};
"fusion" = {
forwardAgent = true;
user = "nathan";
hostname = "100.99.69.14";
};
"de1955" = {
user = "de1955";
hostname = "de1955.rsync.net";
};
};
};
})
];
}

View File

@ -13,6 +13,7 @@ with nLib; {
../common/programs/devel.nix
../common/programs/terminal.nix
../common/programs/git.nix
../common/programs/ssh.nix
./programs/core.nix
./programs/emacs.nix
./programs/devel.nix

View File

@ -13,6 +13,7 @@ with nLib; {
../common/programs/devel.nix
../common/programs/terminal.nix
../common/programs/git.nix
../common/programs/ssh.nix
./programs/sway.nix
./programs/communications.nix
./programs/devel.nix