From 8f5bf08c592e4cf76e8e77d43d16f671cb897dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Sun, 27 Jan 2019 11:16:11 +0100 Subject: [PATCH] pimp network/ssh config --- configs/editors.nix | 4 ++++ configs/graphics.nix | 1 + configs/networks.nix | 26 ++++++++++++++++++++------ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/configs/editors.nix b/configs/editors.nix index 5f56dfe..5c993ee 100644 --- a/configs/editors.nix +++ b/configs/editors.nix @@ -113,6 +113,10 @@ let vim_conf = '' autocmd bufwinenter * if &fdm == 'indent' | setlocal foldmethod=manual | endif endif + if exists("g:loaded_startify") + let g:startify_custom_header = \'\' + endif + "if exists("g:loaded_airline") set noshowmode laststatus=0 noruler let g:airline#extensions#tabline#close_symbol = 'X' diff --git a/configs/graphics.nix b/configs/graphics.nix index 0d1073a..a649327 100644 --- a/configs/graphics.nix +++ b/configs/graphics.nix @@ -18,6 +18,7 @@ ${pkgs.feh}/bin/feh --bg-fill $(find ${../art} -type f | shuf -n 1) & ${pkgs.dropbox-cli}/bin/dropbox start & ${pkgs.seafile-client}/bin/seafile-applet & + ${pkgs.openssh}/bin/ssh-add ''; displayManager.lightdm.greeters.gtk = { enable = true; diff --git a/configs/networks.nix b/configs/networks.nix index bd37b53..bc742ed 100644 --- a/configs/networks.nix +++ b/configs/networks.nix @@ -1,7 +1,11 @@ -{ pkgs, config, ... }: +{ pkgs, config, lib, ... }: { - networking.hosts = { - "192.168.178.27" = [ "printer.local" ]; + networking.hosts = lib.mapAttrs (_: value: [ (value + ".local") ]) { + "192.168.178.21" = "scardanelli"; + "192.168.178.27" = "printer"; + "192.168.178.1" = "router"; + "192.168.178.24" = "lestrade"; + "192.168.178.22" = "homeros"; }; networking.wireless = { @@ -29,16 +33,26 @@ programs.ssh = { enable = true; - matchBlocks = {}; + matchBlocks = { + "lestrade" = { + hostname = "lestrade.local"; + user = "pi"; + }; + }; }; }; programs.ssh = { startAgent = true; - agentTimeout = "10m"; knownHosts = []; + forwardX11 = true; + }; + + services.openssh = { + ports = [ 10022 ]; + enable = true; + forwardX11 = true; }; - services.openssh.forwardX11 = true; networking.retiolum = { scardanelli = {