Something went wrong. Try again.
My Nix Configuration
Something went wrong. Try again.
1.5 kB · 52 lines
Nix
at voidauth
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253{ lib, config, ... }:let cfg = config.py.programs.ssh;in{ options.py.programs.ssh.enable = lib.mkEnableOption "ssh"; config = lib.mkIf cfg.enable { programs.ssh = { enable = true; enableDefaultConfig = false; settings = { "*" = { ForwardAgent = false; AddKeysToAgent = "no"; ServerAliveInterval = 0; ServerAliveCountMax = 3; HashKnownHosts = false; UserKnownHostsFile = "~/.ssh/known_hosts"; ControlMaster = "no"; ControlPath = "~/.ssh/master-%r@%n:%p"; ControlPersist = "no"; Compression = true; }; "marvin" = { Hostname = "100.123.15.72"; User = "thehedgehog"; Port = 22; IdentitiesOnly = false; PreferredAuthentications = "publickey"; }; "prefect" = { Hostname = "100.107.252.71"; User = "thehedgehog"; Port = 22; IdentitiesOnly = false; PreferredAuthentications = "publickey"; }; "test-vm" = { Hostname = "localhost"; User = "root"; Port = 2222; StrictHostKeyChecking = false; PreferredAuthentications = "password"; }; }; extraOptionOverrides = { "Match" = ''host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye"''; }; }; home.file.".ssh/authorized_signatures".text = import ./ssh-auth-signers.nix; };}