better ssh config

This commit is contained in:
Rouven Seifert 2023-11-20 22:47:07 +01:00
parent bad96e4197
commit ac25ed84b0
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
4 changed files with 48 additions and 37 deletions

View file

@ -11,6 +11,17 @@
allowedTCPPortRanges = [{ from = 1714; to = 1764; }]; allowedTCPPortRanges = [{ from = 1714; to = 1764; }];
allowedUDPPortRanges = allowedTCPPortRanges; 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 # wayland keylogger needs setuid
programs.wshowkeys.enable = true; programs.wshowkeys.enable = true;
# fixes pam entries for swaylock # fixes pam entries for swaylock

View file

@ -45,6 +45,7 @@ in
element-desktop element-desktop
gomuks # alternative matrix client gomuks # alternative matrix client
mattermost-desktop mattermost-desktop
gajim
# games # games
# dwarf-fortress-packages.dwarf-fortress-full # dwarf-fortress-packages.dwarf-fortress-full
@ -95,6 +96,7 @@ in
programs.obs-studio.enable = true; programs.obs-studio.enable = true;
programs.firefox.enable = true; programs.firefox.enable = true;
services.gnome-keyring.enable = true;
xdg.mimeApps = { xdg.mimeApps = {
enable = true; enable = true;

View file

@ -6,13 +6,17 @@ in
programs.ssh = rec { programs.ssh = rec {
enable = true; enable = true;
compression = 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 = { matchBlocks = {
"artemis-git.inf.tu-dresden.de" = { # personal use
identityFile = git;
};
"se-gitlab.inf.tu-dresden.de" = {
identityFile = git;
};
"github.com" = { "github.com" = {
identityFile = git; identityFile = git;
}; };
@ -24,54 +28,47 @@ in
VerifyHostKeyDNS = "ask"; VerifyHostKeyDNS = "ask";
}; };
}; };
# used for nix remote building
falkenstein-1 = matchBlocks."rfive.de"; 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" = { "nuc" = {
hostname = "192.168.42.2"; hostname = "192.168.42.2";
user = "root"; user = "root";
}; };
"router" = matchBlocks."cudy";
"cudy" = { "router" = {
hostname = "192.168.42.1"; hostname = "192.168.42.1";
user = "root"; user = "root";
}; };
"git@raspi" = {
match = "Host raspi User git"; # iFSR
identityFile = git; "fsr" = {
hostname = "ifsr.de";
user = "rouven.seifert";
};
"*.ifsr.de" = {
user = "root";
}; };
"git@ifsr.de" = { "git@ifsr.de" = {
match = "Host ifsr.de User git"; match = "Host ifsr.de User git";
identityFile = 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" = { "git@git.agdsn.de" = {
match = "Host git.agdsn.de User git"; match = "Host git.agdsn.de User git";
identityFile = git; identityFile = git;
}; };
}; };
extraConfig = ''
PKCS11Provider /run/current-system/sw/lib/libtpm2_pkcs11.so
IdentityFile ~/.ssh/id_ed25519
VisualHostKey = yes
'';
}; };
} }

View file

@ -8,6 +8,7 @@
systemd.user.sessionVariables.GTK_THEME = "Dracula"; systemd.user.sessionVariables.GTK_THEME = "Dracula";
qt = { qt = {
enable = true; enable = true;
platformTheme = "gtk";
style = { style = {
name = "Dracula"; name = "Dracula";
package = pkgs.dracula-theme; package = pkgs.dracula-theme;