Add wireguard, ollama, openwebui
This commit is contained in:
@@ -1,9 +1,32 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
# Activer Ollama comme service
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "cuda";
|
||||
};
|
||||
}
|
||||
|
||||
services.open-webui = {
|
||||
enable = true;
|
||||
port = 8080; # Port par défaut
|
||||
host = "127.0.0.1"; # Localhost uniquement
|
||||
openFirewall = true;
|
||||
# Pour accès réseau : host = "0.0.0.0";
|
||||
|
||||
environment = {
|
||||
ANONYMIZED_TELEMETRY = "True";
|
||||
DO_NOT_TRACK = "True";
|
||||
SCARF_NO_ANALYTICS = "True";
|
||||
# URL d'Ollama (local)
|
||||
OLLAMA_BASE_URL = "http://127.0.0.1:11434";
|
||||
# Autres options optionnelles (https://docs.openwebui.com/getting-started/env-configuration/#web-search)
|
||||
WEBUI_AUTH = "False"; # Desactive l'authentification
|
||||
# ENABLE_WEB_SEARCH = "True";
|
||||
# ENABLE_SEARCH_QUERY_GENERATION = "True";
|
||||
# WEB_SEARCH_ENGINE = "duckduckgo";
|
||||
# WEB_LOADER_ENGINE = "safe_web";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -90,5 +90,6 @@ in
|
||||
pkgs.nixd
|
||||
pkgs.nixfmt-rfc-style
|
||||
pkgs.ansible
|
||||
pkgs.python313
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@@ -11,7 +11,7 @@
|
||||
../sops-desktop.nix
|
||||
../ssh.nix
|
||||
../sudo-nopasswd.nix
|
||||
|
||||
|
||||
### Import GUI modules
|
||||
../desktop/code.nix
|
||||
../desktop/dunst.nix
|
||||
@@ -27,7 +27,15 @@
|
||||
../desktop/nvidia.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
sops = {
|
||||
secrets = {
|
||||
"wireguard_home/publickey" = { };
|
||||
"wireguard_home/presharedkey" = { };
|
||||
"wireguard_home/privatekey" = { };
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
interfaces.enp5s0 = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
@@ -54,8 +62,30 @@
|
||||
#172.18.20.229 auth.grandbesancon.fr
|
||||
#172.18.20.181 traefikauth.grandbesancon.fr
|
||||
'';
|
||||
wireguard = {
|
||||
interfaces = {
|
||||
wg0 = {
|
||||
ips = [
|
||||
"fc00::2/56"
|
||||
"10.0.0.2/16"
|
||||
];
|
||||
listenPort = 51820;
|
||||
privateKeyFile = config.sops.secrets."wireguard_home/privatekey".path;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "X8D/RhwjpFYXm2DbtC0wY39TrFkdaw7RA7kHhbmOXnw=";
|
||||
presharedKeyFile = config.sops.secrets."wireguard_home/presharedkey".path;
|
||||
allowedIPs = [
|
||||
"fc00::0/56"
|
||||
"10.0.0.0/16"
|
||||
"10.1.0.0/16"
|
||||
];
|
||||
endpoint = "[2001:41d0:303:20da::1]:51820";
|
||||
persistentKeepalive = 15;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
environment.systemPackages = [
|
||||
pkgs.tor-browser
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3,8 +3,12 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.pwgen
|
||||
pkgs.ansible
|
||||
];
|
||||
}
|
||||
# Définition du bloc d'options pour l'environnement de système
|
||||
environment = {
|
||||
# Liste des paquets à installer dans le système
|
||||
systemPackages = [
|
||||
pkgs.pwgen # Générateur de mots de passe
|
||||
pkgs.ansible # Infrastructure de gestion de configuration automatisée
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user