Files
kawa/modules/kawa-physical.nix
Debian 5ca9b06420 Fix NixOS modules: pure evaluation mode, NATS options
- Fix hostname: static value instead of /sys read (pure mode)
- Fix NATS: use settings.http_port instead of httpPort
- Add kawa-base.nix with corrected NATS options
- Update flake.nix to include all modules
- Enable SSH with PermitRootLogin for debugging
2026-03-14 22:34:38 +00:00

91 lines
2.0 KiB
Nix

# KAWA Physical - Configuration pour machine physique CPU
# Usage: imports = [ ./modules/kawa-physical.nix ];
{ pkgs, ... }:
{
# Hostname FIXE (pas de lecture /sys - mode pur)
networking.hostName = "kawa-honor-v4";
# Activation de Tailscale
services.tailscale = {
enable = true;
extraUpFlags = [
"--login-server=https://headscale.du-senegal.com"
"--authkey=f43f36ef159b3df799eb316b81bdac1b415c7cc2add174d0"
"--force-reauth"
];
};
# CONFIGURATION OLLAMA CPU UNIQUEMENT
services.ollama = {
enable = true;
acceleration = null; # Force le mode CPU uniquement
host = "0.0.0.0";
port = 11434;
};
# SSH activé avec PermitRootLogin pour debug
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "yes";
PasswordAuthentication = true;
};
};
# NATS Client (option corrigée)
services.nats = {
enable = true;
server = "100.64.0.1:4222";
};
# Syncthing pour synchronisation
services.syncthing = {
enable = true;
user = "kawa";
group = "kawa";
config = {
devices = {
"vps-7ed4abb0" = { id = "AHF53QZ-ZYCQ2K7-556QBZ2-2UAYZL4-QNEQOGZ-PHZQIAG-4ZRXI3P-QLLJNA6"; };
};
folders = {
"kawa-memory" = {
path = "/home/kawa/.local/share/kawa/memory";
devices = [ "vps-7ed4abb0" ];
};
"kawa-workspace" = {
path = "/home/kawa/.local/share/kawa/workspace";
devices = [ "vps-7ed4abb0" ];
};
};
};
};
# Utilisateur KAWA
users.users.kawa = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "tailscale" "syncthing" ];
initialPassword = "kawa2026";
};
# Firewall
networking.firewall = {
allowedTCPPorts = [ 22 11434 4222 22000 ];
allowedUDPPorts = [ 41641 22000 ];
trustedInterfaces = [ "tailscale0" ];
};
# Packages système
environment.systemPackages = with pkgs; [
git
vim
tailscale
ollama
nats-cli
curl
wget
htop
];
}