diff --git a/config.nix b/config.nix index acff5d3..0cbab14 100644 --- a/config.nix +++ b/config.nix @@ -57,11 +57,12 @@ in { ]; }; - services.openssh.enable = true; programs.ssh = { startAgent = true; + agentTimeout = "10m"; knownHosts = []; }; + services.openssh.forwardX11 = true; programs.tmux = { enable = true; @@ -186,11 +187,12 @@ in { home.file = { ".background-image".source = config.constants.wallpaper; - ".ghci".text = import ./dot/ghci.nix { inherit pkgs; }; - ".stack/config.yaml".text = import ./dot/stack.nix { user = config.constants.user; }; - ".config/zathura/zathurarc".text = "set selection-clipboard clipboard"; ".config/mpv/input.conf".text = import ./dot/mpv.nix; ".config/xfce4/terminal/terminalrc".text = import ./dot/terminal.nix; + ".config/zathura/zathurarc".text = "set selection-clipboard clipboard"; + ".ghci".text = import ./dot/ghci.nix { inherit pkgs; }; + ".ssh/config".text = import ./dot/ssh.nix { inherit lib; }; + ".stack/config.yaml".text = import ./dot/stack.nix { user = config.constants.user; }; ".zshrc".text = "# nothing to see here"; }; }; diff --git a/dot/ssh.nix b/dot/ssh.nix new file mode 100644 index 0000000..8e54624 --- /dev/null +++ b/dot/ssh.nix @@ -0,0 +1,8 @@ +{ lib }: +with lib; +let huServer = name: '' + Host ${name} + HostName ${name}.informatik.hu-berlin.de + User ${(import ../secrets.nix).eduroam.identity} + ''; +in strings.concatMapStringsSep "\n\n" huServer [ "rabe" "star" "gruenau" "gruenau1" "gruenau2" "gruenau3" "gruenau4" "gruenau5" "gruenau6" "gruenau7" "gruenau8" ]