Creating kvm test server
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
pkgs.jq
|
||||
pkgs.bash
|
||||
pkgs.fzf
|
||||
pkgs.bc
|
||||
];
|
||||
services = {
|
||||
locate = {
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
pkgs,
|
||||
username,
|
||||
hostname,
|
||||
modulesPath,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@@ -23,12 +21,14 @@
|
||||
"root"
|
||||
"${username}"
|
||||
];
|
||||
## Use 24 cores during building phases
|
||||
cores = 24;
|
||||
max-jobs = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "${hostname}";
|
||||
networkmanager.enable = true;
|
||||
firewall.enable = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,27 +14,26 @@
|
||||
OLLAMA_KEEP_ALIVE = "5m";
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
};
|
||||
};
|
||||
# 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";
|
||||
# };
|
||||
# };
|
||||
environment = {
|
||||
systemPackages = [
|
||||
pkgs.lmstudio
|
||||
|
||||
@@ -74,7 +74,7 @@ in
|
||||
(pkgs.vscode-with-extensions.override {
|
||||
vscode = pkgs.vscodium;
|
||||
vscodeExtensions = [
|
||||
pkgs.vscode-extensions.continue.continue
|
||||
# pkgs.vscode-extensions.continue.continue
|
||||
pkgs.vscode-extensions.catppuccin.catppuccin-vsc
|
||||
pkgs.vscode-extensions.catppuccin.catppuccin-vsc-icons
|
||||
pkgs.vscode-extensions.jnoortheen.nix-ide
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
../ai.nix
|
||||
../autologin.nix
|
||||
../k8s.nix
|
||||
../libvirt.nix
|
||||
../openfortivpn.nix
|
||||
../packages.nix
|
||||
../sops-desktop.nix
|
||||
@@ -23,6 +24,7 @@
|
||||
../desktop/qwerty-fr.nix
|
||||
../desktop/rofi.nix
|
||||
../desktop/starship.nix
|
||||
../desktop/virt-manager.nix
|
||||
../desktop/wayland.nix
|
||||
|
||||
### Import Graphics modules
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
@@ -6,14 +7,21 @@
|
||||
../sops-desktop.nix
|
||||
../sudo-nopasswd.nix
|
||||
../autologin.nix
|
||||
../ssh.nix
|
||||
../packages.nix
|
||||
|
||||
### Import GUI modules
|
||||
../desktop/dunst.nix
|
||||
../desktop/kitty.nix
|
||||
../desktop/packages.nix
|
||||
../desktop/qwerty-fr.nix
|
||||
../desktop/rofi.nix
|
||||
../desktop/wayland.nix
|
||||
## Server
|
||||
../server/starship.nix
|
||||
];
|
||||
|
||||
## Enable virtualisation guest settings
|
||||
services.qemuGuest.enable = true;
|
||||
services.spice-vdagentd.enable = true;
|
||||
services.xserver = {
|
||||
videoDrivers = [ "modesetting" ]; # Driver vidéo optimisé pour QEMU/KVM
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.spice-gtk # Outils SPICE
|
||||
pkgs.spice-protocol # Protocoles SPICE
|
||||
];
|
||||
}
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
package = pkgs.qemu_full;
|
||||
# package = pkgs.qemu_full;
|
||||
package = pkgs.qemu;
|
||||
runAsRoot = true;
|
||||
swtpm.enable = true;
|
||||
};
|
||||
|
||||
96
modules/optionnals/server/starship.nix
Normal file
96
modules/optionnals/server/starship.nix
Normal file
@@ -0,0 +1,96 @@
|
||||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
environment.sessionVariables = {
|
||||
KUBECONFIG = "$HOME/.kube/config";
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
command_timeout = 1300;
|
||||
scan_timeout = 50;
|
||||
format = "[┌─](fg:surface1)$hostname$username$directory$git_branch$git_status[](fg:base bg:sky)$fill$kubernetes$time[─┐ ](fg:surface1)$line_break[└ ](fg:surface1)";
|
||||
right_format = "[┘](fg:surface1)";
|
||||
palette = "catppuccin_frappe";
|
||||
|
||||
hostname = {
|
||||
ssh_only = false;
|
||||
format = "[](bg:base fg:mauve)[ $hostname ](bg:mauve fg:base)[](bg:mauve fg:blue)";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
username = {
|
||||
style_user = "bg:blue fg:base";
|
||||
style_root = "bg:red fg:base bold";
|
||||
format = "[ $user ]($style)[](bg:blue fg:sapphire)";
|
||||
show_always = true;
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
directory = {
|
||||
format = "[ $path ](bg:sapphire fg:base)[](bg:sapphire fg:sky)";
|
||||
truncation_length = 3;
|
||||
truncation_symbol = "…/";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
symbol = " ";
|
||||
format = "[ $symbol$branch(:$remote_branch) ](fg:base bg:sky)";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
git_status = {
|
||||
format = "([$all_status$ahead_behind ](fg:base bg:sky))";
|
||||
conflicted = "😵";
|
||||
ahead = "";
|
||||
behind = "";
|
||||
diverged = "😵";
|
||||
up_to_date = "✓";
|
||||
untracked = "★";
|
||||
stashed = "📦";
|
||||
modified = "✗";
|
||||
#staged = "[($count)](fg:base bg:sapphire)"
|
||||
staged = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
kubernetes = {
|
||||
disabled = false;
|
||||
format = "[](fg:blue bg:base)[ ($namespace)/($cluster) ](fg:base bg:blue)[](bg:blue fg:mauve)";
|
||||
};
|
||||
|
||||
palettes.catppuccin_frappe = {
|
||||
rosewater = "#f2d5cf";
|
||||
flamingo = "#eebebe";
|
||||
pink = "#f4b8e4";
|
||||
mauve = "#ca9ee6";
|
||||
red = "#e78284";
|
||||
maroon = "#ea999c";
|
||||
peach = "#ef9f76";
|
||||
yellow = "#e5c890";
|
||||
green = "#a6d189";
|
||||
teal = "#81c8be";
|
||||
sky = "#99d1db";
|
||||
sapphire = "#85c1dc";
|
||||
blue = "#8caaee";
|
||||
lavender = "#babbf1";
|
||||
text = "#c6d0f5";
|
||||
subtext1 = "#b5bfe2";
|
||||
subtext0 = "#a5adce";
|
||||
overlay2 = "#949cbb";
|
||||
overlay1 = "#838ba7";
|
||||
overlay0 = "#737994";
|
||||
surface2 = "#626880";
|
||||
surface1 = "#51576d";
|
||||
surface0 = "#414559";
|
||||
base = "#303446";
|
||||
mantle = "#292c3c";
|
||||
crust = "#232634";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user