the configuration for all my nixos machines (hacky! bad! ugly!)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

home-manager now manages ssh config

+41 -1
+1 -1
modules/home/profiles/default.nix
··· 1 1 {...}: { 2 - imports = [ ./desktop ]; 2 + imports = [ ./desktop ./ssh.nix ]; 3 3 }
+40
modules/home/profiles/ssh.nix
··· 1 + {config, lib, pkgs, inputs, ...}: 2 + let cfg = config.profiles.ssh; 3 + in { 4 + options.profiles.ssh.enable = 5 + lib.mkEnableOption "SSH configuration (keys not included)"; 6 + config = lib.mkIf cfg.enable { 7 + services.ssh-agent.enable = true; 8 + programs.ssh = { 9 + enable = true; 10 + enableDefaultConfig = false; 11 + matchBlocks = { 12 + "*" = { 13 + addKeysToAgent = "yes"; 14 + identitiesOnly = true; 15 + }; 16 + anubis = { 17 + hostname = "anubis.bahamut.monster"; 18 + user = "root"; 19 + identityFile = "~/.ssh/id_ed25519"; 20 + forwardAgent = true; 21 + }; 22 + uruk = { 23 + user = "joshua"; 24 + identityFile = "~/.ssh/id_ed25519"; 25 + forwardAgent = true; 26 + }; 27 + github = { 28 + hostname = "github.com"; 29 + user = "git"; 30 + identityFile = "~/.ssh/id_ed25519"; 31 + }; 32 + tangled = { 33 + hostname = "tangled.org"; 34 + user = "git"; 35 + identityFile = "~/.ssh/id_ed25519"; 36 + }; 37 + }; 38 + }; 39 + }; 40 + }