summaryrefslogtreecommitdiffstats
path: root/configs/ssh.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2023-09-11 18:24:28 +0200
committertv <tv@krebsco.de>2023-09-13 18:07:11 +0200
commit0c4f3acb281be6290c55a6e96bc29fab5b5c7a11 (patch)
treedadaec00477a095273475ac345b2066b4748c399 /configs/ssh.nix
parentab1d0479e90f11806d4703ec6fffed3d5f782914 (diff)
stockholm -> hrm
Diffstat (limited to 'configs/ssh.nix')
-rw-r--r--configs/ssh.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/configs/ssh.nix b/configs/ssh.nix
new file mode 100644
index 0000000..0dda6e5
--- /dev/null
+++ b/configs/ssh.nix
@@ -0,0 +1,21 @@
+{ config, lib, pkgs, ... }: {
+ # Override NixOS's "Allow DSA keys for now."
+ environment.etc."ssh/ssh_config".text = lib.mkForce ''
+ AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}
+
+ ${lib.optionalString config.programs.ssh.setXAuthLocation ''
+ XAuthLocation ${pkgs.xorg.xauth}/bin/xauth
+ ''}
+
+ ForwardX11 ${if config.programs.ssh.forwardX11 then "yes" else "no"}
+
+ ${config.programs.ssh.extraConfig}
+ '';
+
+ programs.ssh = {
+ extraConfig = ''
+ UseRoaming no
+ '';
+ startAgent = false;
+ };
+}