nixos/home-manager/modules/programs/ssh/default.nix

38 lines
825 B
Nix
Raw Normal View History

2023-06-12 11:09:48 +02:00
{ config, lib, ... }:
2024-02-02 13:45:05 +01:00
let
cfg = config.programs.az-ssh;
in
{
options = {
programs.az-ssh.enable = lib.mkEnableOption "Enable SSH host.";
};
2023-06-12 11:09:48 +02:00
config = lib.mkIf cfg.enable {
programs.ssh = {
enable = true;
extraConfig = ''
Host nixos.2li.local
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
User nixos
Host mobile.2li.local
StrictHostKeyChecking no
UserKnownHostsFile /dev/null
2023-06-12 11:09:48 +02:00
Host *.2li.local
User andreas
IdentityFile ~/.nixos/secrets/ssh_keys/ansible/ansible.key
Host 10.7.89.*
User andreas
IdentityFile ~/.nixos/secrets/ssh_keys/ansible/ansible.key
Host 10.49.0.100
User zweili
IdentityFile ~/.ssh/zweili.key
'';
};
};
}