From c4676f88e4bbe1676e17d0a47a863ac583da569d Mon Sep 17 00:00:00 2001 From: Pierre Martin Date: Fri, 30 Oct 2026 08:15:01 +0100 Subject: [PATCH] Activer SSH (1987) et mosh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit mosh s'établit d'abord en SSH (TCP 1987) puis bascule en UDP 60000-61000, plage fixe imposée par mosh, non paramétrable. Le mot de passe de session reste utilisable (PasswordAuthentication par défaut à true), pratique sur le réseau local. *Rédaction assistée par IA (Gemini 3 Pro)* Co-Authored-By: Gemini 3 Pro --- nixos/configuration.nix | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 339242d..33b93d5 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -29,7 +29,7 @@ # Enable networking networking.networkmanager.enable = true; - networking.extraHosts = "109.238.11.111 nuage-v1.une-frouzins.fr"; + networking.extraHosts = ""; # Wildcard *.dev.local → 127.0.0.1, requis par gezy-local (Traefik route les # sous-domaines clients). systemd-resolved ne sait pas répondre en wildcard : @@ -125,6 +125,9 @@ ]; virtualisation.docker.enable = true; + # Conteneurs rootless (Yuto tourne dans Podman, cf. INSTALL-PODMAN.txt) + virtualisation.podman.enable = true; + # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; @@ -201,11 +204,17 @@ SystemMaxUse = "500M"; }; - # Enable the OpenSSH daemon. - # services.openssh.enable = true; + # Accès distant SSH + mosh (session interactive résistante aux coupures réseau). + # mosh s'établit d'abord en SSH (TCP 1987) puis bascule en UDP 60000-61000. + services.openssh = { + enable = true; + ports = [ 1987 ]; + openFirewall = true; + }; + programs.mosh.enable = true; # ouvre UDP 60000-61000 # Open ports in the firewall. - # Ports: 9003 - Xdebug + # Ports: 9003 - Xdebug, 1987 - SSH (mosh), 60000-61000 - mosh UDP networking.firewall.allowedTCPPorts = [ 9003 ]; networking.firewall.allowedUDPPorts = [ 9003 ]; # Or disable the firewall altogether.