summaryrefslogtreecommitdiffstats
path: root/tv/2configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2016-07-23 12:18:46 +0200
committertv <tv@krebsco.de>2016-07-23 12:55:04 +0200
commit521771677d3c1381e0e1d38ded93cc6fe276fc9a (patch)
treec9dd7dfa876a5275e59fde76c802b20dc6d1e262 /tv/2configs
parent4a4d7982731d9f7f34693b6a86843050808d8dea (diff)
tv ssh: init
Diffstat (limited to 'tv/2configs')
-rw-r--r--tv/2configs/default.nix8
-rw-r--r--tv/2configs/ssh.nix25
2 files changed, 26 insertions, 7 deletions
diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix
index 04009f5..8a14a24 100644
--- a/tv/2configs/default.nix
+++ b/tv/2configs/default.nix
@@ -28,6 +28,7 @@ with config.krebs.lib;
./audit.nix
./backup.nix
./nginx
+ ./ssh.nix
./vim.nix
{
# stockholm dependencies
@@ -140,13 +141,6 @@ with config.krebs.lib;
fi
'';
};
-
- programs.ssh = {
- extraConfig = ''
- UseRoaming no
- '';
- startAgent = false;
- };
}
{
diff --git a/tv/2configs/ssh.nix b/tv/2configs/ssh.nix
new file mode 100644
index 0000000..7bf5834
--- /dev/null
+++ b/tv/2configs/ssh.nix
@@ -0,0 +1,25 @@
+{ config, pkgs, ... }:
+
+with config.krebs.lib;
+
+{
+ # Override NixOS's "Allow DSA keys for now."
+ environment.etc."ssh/ssh_config".text = mkForce ''
+ AddressFamily ${if config.networking.enableIPv6 then "any" else "inet"}
+
+ ${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;
+ };
+}