From 534e246cec8376ea57b5b36353ebae80b4da0ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Thu, 17 Apr 2025 15:19:12 +0200 Subject: [PATCH] Some SSH stuff --- curacao/hardware.nix | 12 ++++++------ hm/scripts/bsh | 13 +------------ hm/ssh.nix | 5 ++--- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/curacao/hardware.nix b/curacao/hardware.nix index d6330e0..a9b70c0 100644 --- a/curacao/hardware.nix +++ b/curacao/hardware.nix @@ -62,18 +62,18 @@ in phasesCommands = { jour = '' ${pkgs.brightnessctl}/bin/brightnessctl set 40000 & - ${pkgs.ddcutil}/bin/ddcutil setvcp 10 20 -d 1 & - ${pkgs.ddcutil}/bin/ddcutil setvcp 10 20 -d 2 & + # ${pkgs.ddcutil}/bin/ddcutil setvcp 10 20 -d 1 & + # ${pkgs.ddcutil}/bin/ddcutil setvcp 10 20 -d 2 & ''; crepuscule = '' ${pkgs.brightnessctl}/bin/brightnessctl set 10000 & - ${pkgs.ddcutil}/bin/ddcutil setvcp 10 10 -d 1 & - ${pkgs.ddcutil}/bin/ddcutil setvcp 10 10 -d 2 & + # ${pkgs.ddcutil}/bin/ddcutil setvcp 10 10 -d 1 & + # ${pkgs.ddcutil}/bin/ddcutil setvcp 10 10 -d 2 & ''; nuit = '' ${pkgs.brightnessctl}/bin/brightnessctl set 1 & - ${pkgs.ddcutil}/bin/ddcutil setvcp 10 0 -d 1 & - ${pkgs.ddcutil}/bin/ddcutil setvcp 10 0 -d 2 & + # ${pkgs.ddcutil}/bin/ddcutil setvcp 10 0 -d 1 & + # ${pkgs.ddcutil}/bin/ddcutil setvcp 10 0 -d 2 & ''; # TODO Display 2 doesn't work anymore? }; diff --git a/hm/scripts/bsh b/hm/scripts/bsh index dc1780a..85d9a53 100755 --- a/hm/scripts/bsh +++ b/hm/scripts/bsh @@ -58,15 +58,4 @@ then fi -# To keep until https://github.com/openssh/openssh-portable/commit/f64f8c00d158acc1359b8a096835849b23aa2e86 -# is merged -function _ssh { - if [ "${TERM}" = "alacritty" ] - then - TERM=xterm-256color ssh "$@" - else - ssh "$@" - fi -} -alias ssh='_ssh' -_ssh -t "$@" "$(cat "${CACHE_DIR}/cmd")" +ssh -t "$@" "$(cat "${CACHE_DIR}/cmd")" diff --git a/hm/ssh.nix b/hm/ssh.nix index 03459e0..239c334 100644 --- a/hm/ssh.nix +++ b/hm/ssh.nix @@ -10,7 +10,7 @@ programs.ssh = { enable = true; controlMaster = "auto"; - controlPersist = "60s"; # TODO Default is 10minutes... makes more sense no? + controlPersist = "60s"; # Enough to cache Ansible stuff, not too long so I don't have remember which shenanigans I did with my last connection # Ping the server frequently enough so it doesn't think we left (non-spoofable) serverAliveInterval = 30; matchBlocks."*" = { @@ -18,8 +18,7 @@ # as it is kinda a security concern forwardAgent = false; # Restrict terminal features (servers don't necessarily have the terminfo for my cutting edge terminal) - sendEnv = [ "!TERM" ]; - # TODO Why not TERM=xterm-256color? + setEnv = [ "TERM=xterm-256color" ]; extraOptions = { # Check SSHFP records VerifyHostKeyDNS = "yes";