From ac25ed84b06d2f3cb0a139899a15fd0460d4a107 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Mon, 20 Nov 2023 22:47:07 +0100 Subject: [PATCH] better ssh config --- users/rouven/fixes.nix | 11 ++++ users/rouven/modules/packages.nix | 2 + users/rouven/modules/ssh/default.nix | 71 ++++++++++++-------------- users/rouven/modules/theme/default.nix | 1 + 4 files changed, 48 insertions(+), 37 deletions(-) diff --git a/users/rouven/fixes.nix b/users/rouven/fixes.nix index 0ed260f..579fb5e 100644 --- a/users/rouven/fixes.nix +++ b/users/rouven/fixes.nix @@ -11,6 +11,17 @@ allowedTCPPortRanges = [{ from = 1714; to = 1764; }]; allowedUDPPortRanges = allowedTCPPortRanges; }; + # fix session commands for sway + programs.sway = { + enable = true; + extraSessionCommands = '' + source /etc/profile + test -f $HOME/.profile && source $HOME/.profile + export MOZ_ENABLE_WAYLAND=1 + systemctl --user import-environment + ''; + wrapperFeatures.gtk = true; + }; # wayland keylogger needs setuid programs.wshowkeys.enable = true; # fixes pam entries for swaylock diff --git a/users/rouven/modules/packages.nix b/users/rouven/modules/packages.nix index 480b68b..23decf4 100644 --- a/users/rouven/modules/packages.nix +++ b/users/rouven/modules/packages.nix @@ -45,6 +45,7 @@ in element-desktop gomuks # alternative matrix client mattermost-desktop + gajim # games # dwarf-fortress-packages.dwarf-fortress-full @@ -95,6 +96,7 @@ in programs.obs-studio.enable = true; programs.firefox.enable = true; + services.gnome-keyring.enable = true; xdg.mimeApps = { enable = true; diff --git a/users/rouven/modules/ssh/default.nix b/users/rouven/modules/ssh/default.nix index fde3857..ab9b21e 100644 --- a/users/rouven/modules/ssh/default.nix +++ b/users/rouven/modules/ssh/default.nix @@ -6,13 +6,17 @@ in programs.ssh = rec { enable = true; compression = true; + controlMaster = "auto"; + controlPersist = "10m"; + extraConfig = '' + CanonicalizeHostname yes + CanonicalDomains agdsn.network ifsr.de + PKCS11Provider /run/current-system/sw/lib/libtpm2_pkcs11.so + IdentityFile ~/.ssh/id_ed25519 + VisualHostKey = yes + ''; matchBlocks = { - "artemis-git.inf.tu-dresden.de" = { - identityFile = git; - }; - "se-gitlab.inf.tu-dresden.de" = { - identityFile = git; - }; + # personal use "github.com" = { identityFile = git; }; @@ -24,54 +28,47 @@ in VerifyHostKeyDNS = "ask"; }; }; + # used for nix remote building falkenstein-1 = matchBlocks."rfive.de"; - "durian" = { - hostname = "durian.ifsr.de"; - user = "root"; - }; - "kaki" = { - hostname = "kaki.ifsr.de"; - user = "root"; - }; - "ifsr" = { - hostname = "ifsr.de"; - user = "rouven.seifert"; - }; - "fsr" = matchBlocks."ifsr"; - "quitte" = { - hostname = "quitte.ifsr.de"; - user = "root"; - }; - "tomate" = { - hostname = "tomate.ifsr.de"; - user = "root"; - }; + "nuc" = { hostname = "192.168.42.2"; user = "root"; }; - "router" = matchBlocks."cudy"; - "cudy" = { + + "router" = { hostname = "192.168.42.1"; user = "root"; }; - "git@raspi" = { - match = "Host raspi User git"; - identityFile = git; + + # iFSR + "fsr" = { + hostname = "ifsr.de"; + user = "rouven.seifert"; + }; + "*.ifsr.de" = { + user = "root"; }; "git@ifsr.de" = { match = "Host ifsr.de User git"; identityFile = git; }; + + # AG DSN + "dijkstra" = { + hostname = "login.agdsn.tu-dresden.de"; + user = "r5"; + }; + "*.agdsn.network" = { + user = "r5"; + extraOptions = { + ProxyJump = "dijkstra"; + }; + }; "git@git.agdsn.de" = { match = "Host git.agdsn.de User git"; identityFile = git; }; }; - extraConfig = '' - PKCS11Provider /run/current-system/sw/lib/libtpm2_pkcs11.so - IdentityFile ~/.ssh/id_ed25519 - VisualHostKey = yes - ''; }; } diff --git a/users/rouven/modules/theme/default.nix b/users/rouven/modules/theme/default.nix index 8d6d7cf..2c95169 100644 --- a/users/rouven/modules/theme/default.nix +++ b/users/rouven/modules/theme/default.nix @@ -8,6 +8,7 @@ systemd.user.sessionVariables.GTK_THEME = "Dracula"; qt = { enable = true; + platformTheme = "gtk"; style = { name = "Dracula"; package = pkgs.dracula-theme;