all repos — flake @ 17647e11010aa11e48e0d4c1d8d49761ffe15a60

got my cool flake

home/common/ssh.nix (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
{ lib, ... }:
{
  programs.ssh.enableDefaultConfig = false;
  home.activation.writeSSHConfig = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
    rm -f $HOME/.ssh/config
    cat > $HOME/.ssh/config <<EOF
      Host tangled-handle
      IdentitiesOnly yes
      User git
      HostName tangled.sh
      IdentityFile ~/.ssh/id_ed25519_handle

      Host tangled.sh
      IdentitiesOnly yes
      User git
      HostName tangled.sh
      IdentityFile ~/.ssh/id_ed25519
    EOF

    chmod 600 $HOME/.ssh/config
  '';
}