Added nixos configs
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
confDir = "${config.home.homeDirectory}/nixos/files/conf/ssh";
|
||||
sshClientConf = "${confDir}/ssh-client.conf";
|
||||
in
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
|
||||
matchBlocks."*" = {
|
||||
addKeysToAgent = "yes";
|
||||
serverAliveInterval = 30;
|
||||
serverAliveCountMax = 3;
|
||||
};
|
||||
|
||||
# Load your extra SSH config from a file in ~/nixos/files/conf/ssh/
|
||||
extraConfig = ''
|
||||
Include ${config.home.homeDirectory}/nixos/files/conf/ssh/ssh-client.conf
|
||||
'';
|
||||
};
|
||||
|
||||
# Home Manager's ssh-agent (NOT programs.ssh.startAgent; that's NixOS)
|
||||
services.ssh-agent = {
|
||||
enable = true;
|
||||
|
||||
# Optional: if you use zsh, this helps export SSH_AUTH_SOCK in your shell
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user