diff --git a/nixos-infra/hosts/servers/rp01/configuration.nix b/nixos-infra/hosts/servers/rp01/configuration.nix index e5e3e38..32d414b 100644 --- a/nixos-infra/hosts/servers/rp01/configuration.nix +++ b/nixos-infra/hosts/servers/rp01/configuration.nix @@ -11,7 +11,7 @@ # Configuration réseau (IPv4 + IPv6) networking.hostName = "rp01"; networking.interfaces.eth0.ipv4.addresses = [ - { address = "192.168.1.100"; prefixLength = 24; } + { address = "10.40.0.199"; prefixLength = 24; } ]; # networking.interfaces.eth0.ipv6.addresses = [ # { address = "2001:db8::1"; prefixLength = 64; } diff --git a/nixos-infra/modules/machine-types/lxc.nix b/nixos-infra/modules/machine-types/lxc.nix index 5a5eac4..f0a66d3 100644 --- a/nixos-infra/modules/machine-types/lxc.nix +++ b/nixos-infra/modules/machine-types/lxc.nix @@ -41,19 +41,6 @@ boot.kernelModules = [ ]; # TODO : review the disabling of all kernelModules in a container powerManagement.enable = false; - # Enable SSH for deployment - # TODO : maybe move this to a module shared by all machines - services.openssh = { - enable = true; - openFirewall = true; - settings = { - PermitRootLogin = "yes"; - PasswordAuthentication = true; - # TODO : confirm that SSH//PermitEmptyPasswords is not actually needed. - # PermitEmptyPasswords = "yes"; - }; - }; - # Limiter les ressources si nécessaire # TODO : review the need to limit ZFS pools in the LXC container configuration, in my ZFSless context boot.zfs.extraPools = [ ]; diff --git a/nixos-infra/scripts/initial-configuration.nix b/nixos-infra/scripts/initial-configuration.nix index 29940b8..96d3624 100644 --- a/nixos-infra/scripts/initial-configuration.nix +++ b/nixos-infra/scripts/initial-configuration.nix @@ -1,17 +1,17 @@ { config, pkgs, ... }: { - # Activer SSH pour le déploiement + # Install Git, curl, and other required tools + environment.systemPackages = with pkgs; [ git curl ]; + + # Enable unsecured SSH for initial deployment services.openssh = { enable = true; permitRootLogin = "yes"; passwordAuthentication = true; }; - # Installer Git, curl, et les outils nécessaires - environment.systemPackages = with pkgs; [ git curl ]; - - # Ajouter le script de déploiement + # Deployment script system.activationScripts.setup-deploy = '' #!${pkgs.bash}/bin/bash set -euo pipefail @@ -26,4 +26,7 @@ git clone https://gitea.lagraula.fr/xavier/nixos-infra.git /etc/nixos-infra fi ''; + + system.stateVersion = "25.11"; + } \ No newline at end of file