diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a62a2e..9ec7a97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,14 @@ # 🚀 **Current Release - ZaneyOS v2.4** +#### 📅 **Updated: September 9th, 2025** + +- 🛡️ Installer: Added defensive hostname validation and sanitization + - Prevents invalid hostnames (e.g., with dots) from causing Nix evaluation errors + - Auto-sanitizes to a compliant hostname (letters/digits with '-' or '_', 1–63 chars) and prompts for confirmation + - Explicitly rejects 'default' to avoid template overwrites +- 🧩 Nix: Added assertion in modules/core/network.nix for clearer errors if an invalid hostname is provided + #### 📅 **Updated: August 30th, 2025** - Merged `dev` branch to `main` in preparation of v2.4 release diff --git a/FAQ.es.md b/FAQ.es.md index 69c4242..f8fed2f 100644 --- a/FAQ.es.md +++ b/FAQ.es.md @@ -2,8 +2,8 @@ # 💬 Preguntas frecuentes de ZaneyOS para v2.4 -- **Revisión v1.25** -- **Fecha:** 23-agosto-2025 +- **Revisión v1.26** +- **Fecha:** 1-septiembre-2025 > IMPORTANTE: ¿Actualizando de v2.3 a v2.4? > - Altamente recomendado: Lee `ZaneyOS-Upgrade.md` completamente antes de intentar la actualización. diff --git a/FAQ.md b/FAQ.md index ed3c66d..4e7e26b 100644 --- a/FAQ.md +++ b/FAQ.md @@ -2,8 +2,8 @@ # 💬 ZaneyOS FAQ for v2.4 -- **Revision v1.25** -- **Date:** 23-August-2025 +- **Revision v1.26** +- **Date:** 01-September-2025 > IMPORTANT: Upgrading from v2.3 to v2.4? > - Strongly recommended: Read `ZaneyOS-Upgrade.md` fully before attempting the upgrade. diff --git a/README.es.md b/README.es.md index 201851e..0ae47bc 100644 --- a/README.es.md +++ b/README.es.md @@ -22,6 +22,11 @@ Incluye el fondo de pantalla, scripts, aplicaciones, archivos de configuración +### Chuletas y Guías + +- Guía para Principiantes de Nix: [English](cheatsheets/nix-beginner-guide.md) | [Español](cheatsheets/nix-beginner-guide.es.md) +- Guía de Personalización de Hyprland: [English](cheatsheets/hyprland-customization-guide.md) | [Español](cheatsheets/hyprland-customization-guide.es.md) + ### Ten en cuenta: > **Este proyecto tiene un [Wiki](https://zaney.org/wiki/zaneyos-2.3/). ¡Aprende a usar ZaneyOS aquí!** diff --git a/README.md b/README.md index ecdaf6e..e4f8423 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,14 @@ This includes the wallpaper, scripts, applications, config files, and more. +### Cheatsheets and Guides + +- Nix Beginner Guide: [English](cheatsheets/nix-beginner-guide.md) | + [Español](cheatsheets/nix-beginner-guide.es.md) +- Hyprland Customization Guide: + [English](cheatsheets/hyprland-customization-guide.md) | + [Español](cheatsheets/hyprland-customization-guide.es.md) + ### Please note: > **This project has a [Wiki](https://zaney.org/wiki/zaneyos-2.3/). Find out how @@ -156,22 +164,25 @@ Below are the keybindings for Hyprland, formatted for easy reference. ## Installation: -> **⚠️ IMPORTANT:** These installation methods are for **NEW INSTALLATIONS ONLY**. -> If you already have ZaneyOS installed and want to upgrade to v2.4, see the [Upgrade Instructions](#upgrading-from-zaneyos-23-to-24) below. +> **⚠️ IMPORTANT:** These installation methods are for **NEW INSTALLATIONS +> ONLY**. If you already have ZaneyOS installed and want to upgrade to v2.4, see +> the [Upgrade Instructions](#upgrading-from-zaneyos-23-to-24) below. Note: Do +> NOT use upgrade script at this time. It will be restored later.
⬇️ Install with script (NEW INSTALLATIONS ONLY) ### 📜 Script: -This is the easiest and recommended way of starting out for **new installations**. The script is not meant -to allow you to change every option that you can in the flake or help you -install extra packages. It is simply here so you can get my configuration -installed with as little chances of breakages and then fiddle to your hearts -content! +This is the easiest and recommended way of starting out for **new +installations**. The script is not meant to allow you to change every option +that you can in the flake or help you install extra packages. It is simply here +so you can get my configuration installed with as little chances of breakages +and then fiddle to your hearts content! -> **⚠️ WARNING:** This script will completely replace any existing ~/zaneyos directory. -> Do NOT use this if you already have ZaneyOS installed and configured. +> **⚠️ WARNING:** This script will completely replace any existing ~/zaneyos +> directory. Do NOT use this if you already have ZaneyOS installed and +> configured. Simply copy this and run it: @@ -256,13 +267,15 @@ called `fr` that will rebuild the flake and you do not have to be in the
-## Upgrading from ZaneyOS 2.3 to 2.4 +## Upgrading from ZaneyOS 2.3 to 2.4 -- Do NOT use the upgrade script at this timel. -> **🚀 IMPORTANT:** If you already have ZaneyOS 2.3 installed, use the automated upgrade system instead of reinstalling! +> **🚀 IMPORTANT:** If you already have ZaneyOS 2.3 installed, use the automated +> upgrade system instead of reinstalling! ### ✅ Automated Upgrade Process: -ZaneyOS includes a comprehensive upgrade system that safely migrates your configuration: +ZaneyOS includes a comprehensive upgrade system that safely migrates your +configuration: ```bash cd ~/zaneyos @@ -280,7 +293,7 @@ cd ~/zaneyos ### 📋 What Gets Automatically Migrated: - ✅ All host configurations and variables -- ✅ Hardware configurations +- ✅ Hardware configurations - ✅ Custom packages (both global and per-host) - ✅ Themes, wallpapers, and monitor settings - ✅ Git configuration and personal settings @@ -297,7 +310,8 @@ cd ~/zaneyos For detailed upgrade instructions, troubleshooting, and safety information: - **Read**: `UPGRADE-2.3-to-2.4.md` in your zaneyos directory -- **Analysis Report**: Saved automatically as `~/zaneyos-upgrade-analysis-TIMESTAMP.txt` +- **Analysis Report**: Saved automatically as + `~/zaneyos-upgrade-analysis-TIMESTAMP.txt` ### 🔄 Easy Revert: diff --git a/cheatsheets/hyprland-customization-guide.es.md b/cheatsheets/hyprland-customization-guide.es.md new file mode 100644 index 0000000..4c45e75 --- /dev/null +++ b/cheatsheets/hyprland-customization-guide.es.md @@ -0,0 +1,164 @@ +# Guía de Personalización de Hyprland en ZaneyOS + +Esta guía ofrece una visión práctica para personalizar tu experiencia con Hyprland en ZaneyOS. Veremos los archivos más relevantes, qué hacen y pequeños cambios seguros que puedes aplicar. + +Nota: Estos archivos están escritos en Nix. Un pequeño error de sintaxis puede romper las compilaciones. Realiza un cambio a la vez y mantén tus ediciones bajo control de versiones. + +## Aplicar tus cambios + +Preferido (específico de ZaneyOS): +- `zcli rebuild` + - Nota: el alias `fr` está obsoleto. + +Método manual de respaldo (funciona en cualquier instalación): +- Desde la raíz del repo, reemplaza PROFILE por tu perfil (intel, nvidia, nvidia-laptop, vm): + - `sudo nixos-rebuild switch --flake .#PROFILE` + +--- + +### `binds.nix` — Atajos de teclado + +Controla atajos de teclado y ratón. + +Ubicación: `modules/home/hyprland/binds.nix` + +Formato: `MODIFICADOR, TECLA, DISPATCHER, VALOR` + +Ejemplo: Cambiar la terminal de Super+Return a Super+T + +```nix +# ... + bind = [ + # ... + "$modifier,T,exec, ${terminal}" + # ... + ]; +# ... +``` + +--- + +### `exec-once.nix` — Aplicaciones al iniciar + +Comandos que se ejecutan automáticamente con Hyprland. + +Ubicación: `modules/home/hyprland/exec-once.nix` + +Ejemplo: Añadir copyq al inicio + +```nix +# ... + exec-once = [ + # ... + "pypr &" + "copyq" + ]; +# ... +``` + +--- + +### `decoration.nix` — Bordes, sombras, desenfoque + +Ubicación: `modules/home/hyprland/decoration.nix` + +Ejemplo: Esquinas redondeadas + +```nix +# ... + decoration = { + rounding = 10; + }; +# ... +``` + +--- + +### `env.nix` — Variables de entorno + +Ubicación: `modules/home/hyprland/env.nix` + +Ejemplo: Habilitar Wayland para Firefox + +```nix +# ... + env = [ + "SDL_VIDEODRIVER, wayland" + "MOZ_ENABLE_WAYLAND, 1" + ]; +# ... +``` + +--- + +### `gestures.nix` — Gestos del touchpad + +Ubicación: `modules/home/hyprland/gestures.nix` + +Ejemplo: Desactivar deslizamiento entre espacios + +```nix +# ... + gestures = { + workspace_swipe = 0; + }; +# ... +``` + +--- + +### `misc.nix` — Ajustes varios + +Ubicación: `modules/home/hyprland/misc.nix` + +Ejemplo: Activar Frecuencia de Actualización Variable (VRR) + +```nix +# ... + misc = { + vrr = 1; + }; +# ... +``` + +--- + +### `hyprland.nix` — Configuración principal + +Ubicación: `modules/home/hyprland/hyprland.nix` + +Ejemplo: Distribución del teclado + +```nix +# ... + input = { + kb_layout = "us"; + }; +# ... +``` + +--- + +### `windowrules.nix` — Reglas de ventanas + +Ubicación: `modules/home/hyprland/windowrules.nix` + +Ejemplo: Hacer que Thunar flote siempre + +```nix +# ... + windowrule = [ + "float, class:^(foot-floating)$" + "float, class:^(Thunar)$" + ]; +# ... +``` + +--- + +## Consejos útiles + +- Realiza un cambio a la vez y recompila para validar. +- Mantén una terminal abierta mientras experimentas por si cambias el atajo del lanzador. +- Si algo se rompe, reinicia y elige una generación anterior en el menú de arranque. + diff --git a/cheatsheets/hyprland-customization-guide.md b/cheatsheets/hyprland-customization-guide.md new file mode 100644 index 0000000..a6dc93d --- /dev/null +++ b/cheatsheets/hyprland-customization-guide.md @@ -0,0 +1,163 @@ +# A Guide to Customizing Hyprland in ZaneyOS + +This guide provides a practical overview for customizing your Hyprland experience in ZaneyOS. We’ll cover the most relevant files, what they do, and small, safe edits you can make. + +Note: These files are written in Nix. A small syntax error can break builds. Make one change at a time and keep your edits under version control. + +## Applying your changes + +Preferred (ZaneyOS-specific): +- `zcli rebuild` + - Note: The `fr` alias is deprecated. + +Manual backup method (works anywhere): +- From the repo root, replace PROFILE with your profile (intel, nvidia, nvidia-laptop, vm): + - `sudo nixos-rebuild switch --flake .#PROFILE` + +--- + +### `binds.nix` — Keybindings + +Controls keyboard and mouse shortcuts. + +Location: `modules/home/hyprland/binds.nix` + +Format: `MODIFIER, KEY, DISPATCHER, VALUE` + +Example: Change terminal from Super+Return to Super+T + +```nix +# ... + bind = [ + # ... + "$modifier,T,exec, ${terminal}" + # ... + ]; +# ... +``` + +--- + +### `exec-once.nix` — Startup applications + +Commands that start automatically with Hyprland. + +Location: `modules/home/hyprland/exec-once.nix` + +Example: Add copyq to autostart + +```nix +# ... + exec-once = [ + # ... + "pypr &" + "copyq" + ]; +# ... +``` + +--- + +### `decoration.nix` — Borders, shadows, blur + +Location: `modules/home/hyprland/decoration.nix` + +Example: Rounded corners + +```nix +# ... + decoration = { + rounding = 10; + }; +# ... +``` + +--- + +### `env.nix` — Environment variables + +Location: `modules/home/hyprland/env.nix` + +Example: Enable Wayland for Firefox + +```nix +# ... + env = [ + "SDL_VIDEODRIVER, wayland" + "MOZ_ENABLE_WAYLAND, 1" + ]; +# ... +``` + +--- + +### `gestures.nix` — Touchpad gestures + +Location: `modules/home/hyprland/gestures.nix` + +Example: Disable workspace swipe + +```nix +# ... + gestures = { + workspace_swipe = 0; + }; +# ... +``` + +--- + +### `misc.nix` — Misc settings + +Location: `modules/home/hyprland/misc.nix` + +Example: Enable Variable Refresh Rate + +```nix +# ... + misc = { + vrr = 1; + }; +# ... +``` + +--- + +### `hyprland.nix` — Main configuration + +Location: `modules/home/hyprland/hyprland.nix` + +Example: Keyboard layout + +```nix +# ... + input = { + kb_layout = "us"; + }; +# ... +``` + +--- + +### `windowrules.nix` — Window rules + +Location: `modules/home/hyprland/windowrules.nix` + +Example: Float Thunar always + +```nix +# ... + windowrule = [ + "float, class:^(foot-floating)$" + "float, class:^(Thunar)$" + ]; +# ... +``` + +--- + +## Helpful tips + +- Make one change at a time and rebuild to validate. +- Keep a terminal open during experiments in case your launcher keybind changes. +- If something breaks, reboot and choose a previous generation in the boot menu. diff --git a/cheatsheets/hyprland/hyprland.binds.cheatsheet.md b/cheatsheets/hyprland/hyprland.binds.cheatsheet.md index 5f8f4dd..c024232 100644 --- a/cheatsheets/hyprland/hyprland.binds.cheatsheet.md +++ b/cheatsheets/hyprland/hyprland.binds.cheatsheet.md @@ -50,6 +50,7 @@ - SUPERKEY+F — Fullscreen - SUPERKEY+SHIFT+F — Toggle floating - SUPERKEY+ALT+F — Workspace option: allfloat +- SUPERKEY+SHIFT+C — Exit Hyprland - SUPERKEY+SPACE — Toggle floating - SUPERKEY+SHIFT+SPACE — Workspace option: allfloat - SUPERKEY+SHIFT+M — swap_layout diff --git a/cheatsheets/nix-beginner-guide.es.md b/cheatsheets/nix-beginner-guide.es.md new file mode 100644 index 0000000..3ec70b1 --- /dev/null +++ b/cheatsheets/nix-beginner-guide.es.md @@ -0,0 +1,67 @@ +# Guía para Principiantes de ZaneyOS: Personalización Básica + +¡Bienvenido! Esta guía es para quienes son nuevos en Nix y quieren realizar personalizaciones comunes y seguras en su instalación de ZaneyOS. Mantendremos todo simple y al grano. + +## Diseño del repositorio (dónde cambiar las cosas) + +- `flake.nix`: Punto de entrada del sistema. Normalmente no necesitas editarlo para ajustes cotidianos. +- `hosts/`: Configuración por máquina. + - `hosts//` + - `variables.nix`: Tu panel principal (activar/desactivar funciones, establecer opciones). + - `host-packages.nix`: Paquetes extra solo para esta máquina. +- `modules/`: Bloques reutilizables para el sistema y Home Manager. + - `modules/core/global-packages.nix`: Paquetes instalados en todas las máquinas. + - `modules/home/hyprland/binds.nix`: Atajos de Hyprland. + +## Instalar paquetes + +Dos patrones comunes: + +### 1) Solo en esta máquina +Edita `hosts//host-packages.nix` y añade el nombre del paquete: + +```nix +[ + brave + (catppuccin-vsc.override { + variant = "mocha"; + }) + cowsay +] +``` + +### 2) En todas las máquinas +Edita `modules/core/global-packages.nix` y añade el paquete a la lista. + +## Ajustes de monitores (por host) + +Edita `hosts//variables.nix` y define la(s) línea(s) extra del monitor: + +```nix +# Ejemplo: 1080p a 144 Hz en DP-1 +extraMonitorSettings = "monitor=DP-1,1920x1080@144"; +``` + +## Cambiar atajos de Hyprland + +Edita `modules/home/hyprland/binds.nix`. Por ejemplo, cambiar la terminal de Super+Return a Super+T: + +```nix +"SUPER, T, exec, ${terminal}" +``` + +## Aplicar y probar tus cambios + +Preferido (específico de ZaneyOS): +- `zcli rebuild` + - Nota: el alias `fr` está obsoleto. + +Método manual de respaldo (funciona en cualquier instalación): +- Desde la raíz del repo, reemplaza PROFILE por tu perfil (intel, nvidia, nvidia-laptop, vm): + - `sudo nixos-rebuild switch --flake .#PROFILE` + +Consejos +- Si un rebuild falla, lee el error cerca del final: suele apuntar al archivo/línea exacta. +- Si un cambio rompe tu sesión tras reiniciar, elige una “generación” anterior en el menú de arranque. +- Usa Git para versionar tus cambios y poder revertir fácilmente. + diff --git a/cheatsheets/nix-beginner-guide.md b/cheatsheets/nix-beginner-guide.md new file mode 100644 index 0000000..cc88d20 --- /dev/null +++ b/cheatsheets/nix-beginner-guide.md @@ -0,0 +1,66 @@ +# ZaneyOS Beginner’s Guide to Customization + +Welcome! This guide is for users who are new to Nix and want to make common, safe customizations to their ZaneyOS setup. We’ll keep it simple and focus on essentials. + +## Repository layout (where to change things) + +- `flake.nix`: Entry point for the whole system. You generally don’t need to edit this for day‑to‑day tweaks. +- `hosts/`: Per‑machine configuration. + - `hosts//` + - `variables.nix`: Your main control panel (enable/disable features, set options). + - `host-packages.nix`: Extra packages only for this one machine. +- `modules/`: Reusable building blocks for the system and Home Manager. + - `modules/core/global-packages.nix`: Packages installed on all machines. + - `modules/home/hyprland/binds.nix`: Hyprland keybindings. + +## Installing packages + +Two common patterns: + +### 1) Only on this machine +Edit `hosts//host-packages.nix` and add the package name: + +```nix +[ + brave + (catppuccin-vsc.override { + variant = "mocha"; + }) + cowsay +] +``` + +### 2) On all machines +Edit `modules/core/global-packages.nix` and add the package to the list. + +## Monitor settings (per host) + +Edit `hosts//variables.nix` and set the extra monitor line(s): + +```nix +# Example: 1080p at 144 Hz on DP-1 +extraMonitorSettings = "monitor=DP-1,1920x1080@144"; +``` + +## Change Hyprland keybindings + +Edit `modules/home/hyprland/binds.nix`. For example, change terminal from Super+Return to Super+T: + +```nix +"SUPER, T, exec, ${terminal}" +``` + +## Apply and test your changes + +Preferred (ZaneyOS-specific): +- `zcli rebuild` + - Note: The `fr` alias is deprecated. + +Manual backup method (works anywhere): +- From the repo root, replace PROFILE with your profile (intel, nvidia, nvidia-laptop, vm): + - `sudo nixos-rebuild switch --flake .#PROFILE` + +Tips +- If a rebuild fails, read the error near the bottom of the output—it usually points to the exact file/line. +- If a change breaks your session after a reboot, pick an older “generation” from the boot menu to roll back. +- Use Git to track your edits so you can revert easily. diff --git a/flake.lock b/flake.lock index 99b5ea2..f61677e 100644 --- a/flake.lock +++ b/flake.lock @@ -107,11 +107,11 @@ ] }, "locked": { - "lastModified": 1754487366, - "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=", + "lastModified": 1756770412, + "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18", + "rev": "4524271976b625a4a605beefd893f270620fd751", "type": "github" }, "original": { @@ -181,11 +181,11 @@ ] }, "locked": { - "lastModified": 1756245065, - "narHash": "sha256-aAZNbGcWrVRZgWgkQbkabSGcDVRDMgON4BipMy69gvI=", + "lastModified": 1758463745, + "narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=", "owner": "nix-community", "repo": "home-manager", - "rev": "54b2879ce622d44415e727905925e21b8f833a98", + "rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3", "type": "github" }, "original": { @@ -197,11 +197,11 @@ }, "mnw": { "locked": { - "lastModified": 1748710831, - "narHash": "sha256-eZu2yH3Y2eA9DD3naKWy/sTxYS5rPK2hO7vj8tvUCSU=", + "lastModified": 1756659871, + "narHash": "sha256-v6Rh4aQ6RKjM2N02kK9Usn0Ix7+OY66vNpeklc1MnGE=", "owner": "Gerg-L", "repo": "mnw", - "rev": "cff958a4e050f8d917a6ff3a5624bc4681c6187d", + "rev": "ed6cc3e48557ba18266e598a5ebb6602499ada16", "type": "github" }, "original": { @@ -228,11 +228,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1754937576, - "narHash": "sha256-3sWA5WJybUE16kIMZ3+uxcxKZY/JRR4DFBqLdSLBo7w=", + "lastModified": 1758791193, + "narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "84c26d62ce9e15489c63b83fc44e6eb62705d2c9", + "rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01", "type": "github" }, "original": { @@ -244,11 +244,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1755049066, - "narHash": "sha256-ANrc15FSoOAdNbfKHxqEJjZLftIwIsenJGRb/04K41s=", + "lastModified": 1756696532, + "narHash": "sha256-6FWagzm0b7I/IGigOv9pr6LL7NQ86mextfE8g8Q6HBg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e45f8f193029378d0aaee5431ba098dc80054e9a", + "rev": "58dcbf1ec551914c3756c267b8b9c8c86baa1b2f", "type": "github" }, "original": { @@ -309,11 +309,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1755463179, - "narHash": "sha256-5Ggb1Mhf7ZlRgGi2puCa2PvWs6KbMnWBlW6KW7Vf79Y=", + "lastModified": 1758271661, + "narHash": "sha256-ENqd2/33uP5vB44ClDjjAV+J78oF8q1er4QUZuT8Z7g=", "owner": "notashelf", "repo": "nvf", - "rev": "03833118267ad32226b014b360692bdce9d6e082", + "rev": "b7571df4d6e9ac08506a738ddceeec0b141751b0", "type": "github" }, "original": { @@ -350,11 +350,11 @@ "tinted-zed": "tinted-zed" }, "locked": { - "lastModified": 1755710103, - "narHash": "sha256-VmheUy4UzWDy/u0TvCCHptgF30peL7wRxkHy7EVpDrQ=", + "lastModified": 1759050585, + "narHash": "sha256-Mj99rGy+K9jaQ85U2YWydZ9OKCIAdkxClrJlfG04GxU=", "owner": "danth", "repo": "stylix", - "rev": "79be65b20d7b8fb7e8f39ba8121cfe41b7f46808", + "rev": "3f71498ed14405aea347b9f5b7f56d97e64e904c", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 417408e..c88f2b5 100644 --- a/flake.nix +++ b/flake.nix @@ -30,8 +30,8 @@ }@inputs: let system = "x86_64-linux"; - host = "zaneyos-oem"; - profile = "vm"; + host = "zaneyos-24-vm"; + profile = "vm"; username = "dwilliams"; # Deduplicate nixosConfigurations while preserving the top-level 'profile' diff --git a/hosts/zaneyos-24-vm/default.nix b/hosts/zaneyos-24-vm/default.nix new file mode 100644 index 0000000..1ef7d77 --- /dev/null +++ b/hosts/zaneyos-24-vm/default.nix @@ -0,0 +1,6 @@ +{ ... }: { + imports = [ + ./hardware.nix + ./host-packages.nix + ]; +} diff --git a/hosts/zaneyos-24-vm/hardware.nix b/hosts/zaneyos-24-vm/hardware.nix new file mode 100644 index 0000000..0289b85 --- /dev/null +++ b/hosts/zaneyos-24-vm/hardware.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot = { + initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + }; + + fileSystems = { + "/" + = { + device = "/dev/disk/by-uuid/e5fc1006-4d0b-41db-8c43-22b3cb8110c6"; + fsType = "ext4"; + }; + "/boot" = { + device = "/dev/disk/by-uuid/9287-3738"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + "/mnt/nas" = { + device = "192.168.40.11:/volume1/DiskStation54TB"; + fsType = "nfs"; + options = [ "rw" "bg" "tcp" "soft" "_netdev" ]; + }; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/a6e9dd8b-6767-44f4-84fa-30d02d90d087"; } + ]; + + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + + security.sudo.wheelNeedsPassword = false; +} diff --git a/hosts/zaneyos-24-vm/host-packages.nix b/hosts/zaneyos-24-vm/host-packages.nix new file mode 100644 index 0000000..f44b200 --- /dev/null +++ b/hosts/zaneyos-24-vm/host-packages.nix @@ -0,0 +1,7 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + audacity + discord + nodejs + ]; +} diff --git a/hosts/zaneyos-24-vm/variables.nix b/hosts/zaneyos-24-vm/variables.nix new file mode 100644 index 0000000..4036d73 --- /dev/null +++ b/hosts/zaneyos-24-vm/variables.nix @@ -0,0 +1,110 @@ +{ + # Git Configuration ( For Pulling Software Repos ) + gitUsername = "dwilliams"; + gitEmail = "don.e.williams@gmail.com"; + + # Set Displau Manager + # `tui` for Text login + # `sddm` for graphical GUI (default) + # SDDM background is set with stylixImage + displayManager = "sddm"; + + # Emable/disable bundled applications + tmuxEnable = false; + alacrittyEnable = false; + weztermEnable = false; + ghosttyEnable = false; + vscodeEnable = false; + # Note: This is evil-helix with VIM keybindings by default + helixEnable = false; + #To install: Enable here, zcli rebuild, then run zcli doom install + doomEmacsEnable = true; + + # Hyprland Settings + # Examples: + # extraMonitorSettings = "monitor = Virtual-1,1920x1080@60,auto,1"; + # extraMonitorSettings = "monitor = HDMI-A-1,1920x1080@60,auto,1"; + # You can configure multiple monitors. + # Inside the quotes, create a new line for each monitor. + extraMonitorSettings = " + + "; + + # Waybar Settings + clock24h = false; + + # Program Options + # Set Default Browser (google-chrome-stable for google-chrome) + # This does NOT install your browser + # You need to install it by adding it to the `packages.nix` + # or as a flatpak + browser = "brave"; + + # Available Options: + # Kitty, ghostty, wezterm, aalacrity + # Note: kitty, wezterm, alacritty have to be enabled in `variables.nix` + # Setting it here does not enable it. Kitty is installed by default + terminal = "kitty"; # Set Default System Terminal + + keyboardLayout = "us"; + consoleKeyMap = "us"; + + # For Nvidia Prime support + intelID = "PCI:1:0:0"; + nvidiaID = "PCI:0:2:0"; + + # Enable NFS + enableNFS = true; + + # Enable Printing Support + printEnable = false; + + # Enable Thunar GUI File Manager + # Yazi is default File Manager + thunarEnable = false; + + # Themes, waybar and animation. + # Only uncomment your selection + # The others much be commented out. + + # Set Stylix Image + # This will set your color palette + # Default background + # Add new images to ~/zaneyos/wallpapers + stylixImage = ../../wallpapers/mountainscapedark.jpg; + #stylixImage = ../../wallpapers/AnimeGirlNightSky.jpg; + #stylixImage = ../../wallpapers/Anime-Purple-eyes.png; + #stylixImage = ../../wallpapers/Rainnight.jpg; + #stylixImage = ../../wallpapers/zaney-wallpaper.jpg; + #stylixImage = ../../wallpapers/nix-wallpapers-strips-logo.jpg; + #stylixImage = ../../wallpapers/beautifulmountainscape.jpg; + + # Set Waybar + # Available Options: + #waybarChoice = ../../modules/home/waybar/waybar-curved.nix; + #waybarChoice = ../../modules/home/waybar/waybar-ddubs.nix; + #waybarChoice = ../../modules/home/waybar/waybar-ddubs-2.nix; + #waybarChoice = ../../modules/home/waybar/waybar-simple.nix; + # Throwback to ZaneyOS v1.0 + #waybarChoice = ../../modules/home/waybar/waybar-jerry.nix; + # Very colorful and bright colors + #waybarChoice = ../../modules/home/waybar/waybar-nekodyke.nix; + # DWM styled waybars from Matt at TheLinuxCast + #waybarChoice = ../../modules/home/waybar/waybar-dwm.nix; + waybarChoice = ../../modules/home/waybar/waybar-dwm-2.nix; + + # Set Animation style + # Available options are: + # animations-def.nix (default) + # animations-end4.nix (end-4 project very fluid) + # animations-dynamic.nix (ml4w project) + # animations-moving.nix (ml4w project) + #animChoice = ../../modules/home/hyprland/animations-def.nix; + #animChoice = ../../modules/home/hyprland/animations-end4.nix; + animChoice = ../../modules/home/hyprland/animations-dynamic.nix; + #animChoice = ../../modules/home/hyprland/animations-moving.nix; + + # Set network hostId if required (needed for zfs) + # Otherwise leave as-is + hostId = "5ab03f50"; +} diff --git a/install-zaneyos.sh b/install-zaneyos.sh index ed6e5f4..f8c74b8 100755 --- a/install-zaneyos.sh +++ b/install-zaneyos.sh @@ -18,6 +18,43 @@ LOG_FILE="${LOG_DIR}/install_$(date +"%Y-%m-%d_%H-%M-%S").log" mkdir -p "$LOG_DIR" exec > >(tee -a "$LOG_FILE") 2>&1 +# Hostname validation and sanitization helpers +HOSTNAME_REGEX='^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$' + +is_valid_hostname() { + local hn="$1" + [[ "$hn" =~ $HOSTNAME_REGEX ]] +} + +sanitize_hostname() { + local hn="$1" + # Lowercase + hn=$(printf '%s' "$hn" | tr '[:upper:]' '[:lower:]') + # Replace invalid chars (including dots/spaces) with '-' + hn=$(printf '%s' "$hn" | sed -E 's/[^[:alnum:]_-]+/-/g') + # Collapse consecutive - or _ to a single - + hn=$(printf '%s' "$hn" | sed -E 's/[-_]{2,}/-/g') + # Trim leading/trailing non-alnum + hn=$(printf '%s' "$hn" | sed -E 's/^[^[:alnum:]]+//; s/[^[:alnum:]]+$//') + # Truncate to 63 characters (hostname label limit) + hn=${hn:0:63} + # Ensure start/end are alnum in case truncation left a non-alnum at edges + hn=$(printf '%s' "$hn" | sed -E 's/^[^[:alnum:]]+//; s/[^[:alnum:]]+$//') + printf '%s' "$hn" +} + +ensure_safe_hostname() { + # Usage: ensure_safe_hostname + local input="$1"; local def="$2" + local candidate="$input" + if [ -z "$candidate" ]; then candidate="$def"; fi + local sanitized + sanitized=$(sanitize_hostname "$candidate") + if [ -z "$sanitized" ]; then sanitized="$def"; fi + if ! is_valid_hostname "$sanitized"; then return 1; fi + printf '%s' "$sanitized" +} + # Function to print a section header print_header() { echo -e "${GREEN}╔═══════════════════════════════════════════════════════════════════════╗${NC}" @@ -109,6 +146,25 @@ if [ "$hostName" = "default" ]; then fi fi +# Validate and sanitize hostname to meet NixOS constraints +safeHost=$(ensure_safe_hostname "$hostName" "my-desktop") +if [ "$safeHost" != "$hostName" ]; then + echo -e "${RED}The hostname '$hostName' is not compliant (letters, numbers, '-', '_' only; 1-63 chars; start/end alnum).${NC}" + echo -e "It will be adjusted to: ${GREEN}$safeHost${NC}" + read -p "Use '$safeHost'? (Y/n): " -n 1 -r; echo + if [[ $REPLY =~ ^[Nn]$ ]]; then + read -rp "Enter a hostname (letters, numbers, hyphens/underscores; 1-63 chars): " hostName + safeHost=$(ensure_safe_hostname "$hostName" "my-desktop") + fi +fi + +if ! is_valid_hostname "$safeHost"; then + print_error "Hostname '$hostName' is invalid even after sanitization." + echo "Please rerun and choose a compliant hostname (letters, numbers, hyphens, underscores; 1-63 chars, start/end alphanumeric)." + exit 1 +fi + +hostName="$safeHost" echo -e "${GREEN}✓ Hostname set to: $hostName${NC}" print_header "GPU Profile Detection" @@ -219,7 +275,7 @@ else fi print_header "Cloning ZaneyOS Repository" -git clone https://gitlab.com/zaney/zaneyos.git --depth=1 ~/zaneyos +git clone https://gitlab.com/zaney/zaneyos.git -b stable-2.4 --depth=1 ~/zaneyos cd ~/zaneyos || exit 1 print_header "Git Configuration" diff --git a/modules/core/fonts.nix b/modules/core/fonts.nix index 2703381..4861b8a 100644 --- a/modules/core/fonts.nix +++ b/modules/core/fonts.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ fonts = { packages = with pkgs; [ dejavu_fonts @@ -22,7 +23,7 @@ powerline-fonts roboto roboto-mono - #symbola + symbola terminus_font ]; }; diff --git a/modules/core/network.nix b/modules/core/network.nix index 132d9bc..e6f0b59 100644 --- a/modules/core/network.nix +++ b/modules/core/network.nix @@ -7,6 +7,14 @@ let inherit (import ../../hosts/${host}/variables.nix) hostId; in { + # Defensive assertion for hostname validity (clearer message at eval time) + assertions = [ + { + assertion = builtins.match "^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$" host != null; + message = "Invalid hostname '${host}'. Must be 1-63 chars, start/end alphanumeric; allowed middle chars: letters, digits, '-' or '_'."; + } + ]; + networking = { hostName = "${host}"; hostId = hostId; diff --git a/modules/core/packages.nix b/modules/core/packages.nix index 4c9fc35..5e35dd4 100644 --- a/modules/core/packages.nix +++ b/modules/core/packages.nix @@ -32,12 +32,10 @@ # Hyprland systeminfo QT (Optional) #inputs.hyprsysteminfo.packages.${pkgs.system}.default - #aider-chat # AI in terminal (Optional: Client only) amfora # Fancy Terminal Browser For Gemini Protocol appimage-run # Needed For AppImage Support brave # Brave Browser brightnessctl # For Screen Brightness Control - #claude-code # Claude code terminal AI (Optional: Client only) cliphist # Clipboard manager using rofi menu cmatrix # Matrix Movie Effect In Terminal cowsay # Great Fun Terminal Program @@ -79,6 +77,7 @@ usbutils # Good Tools For USB Devices uwsm # Universal Wayland Session Manager (optional must be enabled) v4l-utils # Used For Things Like OBS Virtual Camera + waypaper # wallpaper changer warp-terminal # Terminal with AI support build in wget # Tool For Fetching Files With Links ytmdl # Tool For Downloading Audio From YouTube diff --git a/modules/drivers/vm-guest-services.nix b/modules/drivers/vm-guest-services.nix index d3e0555..d14229d 100644 --- a/modules/drivers/vm-guest-services.nix +++ b/modules/drivers/vm-guest-services.nix @@ -15,6 +15,6 @@ in config = mkIf cfg.enable { services.qemuGuest.enable = true; services.spice-vdagentd.enable = true; - services.spice-webdavd.enable = true; - }; + services.spice-webdavd.enable = false; #Causes navfs2 build failure invalid neon version 9-12-25 + }; } diff --git a/modules/home/editors/doom-emacs.nix b/modules/home/editors/doom-emacs.nix index e9cd845..ca1f248 100644 --- a/modules/home/editors/doom-emacs.nix +++ b/modules/home/editors/doom-emacs.nix @@ -1,7 +1,7 @@ { pkgs, ... }: { home.packages = with pkgs; [ - emacs-gtk + emacs-pgtk git lazygit ripgrep diff --git a/modules/home/hyprland/binds.nix b/modules/home/hyprland/binds.nix index 3efa265..025cb08 100644 --- a/modules/home/hyprland/binds.nix +++ b/modules/home/hyprland/binds.nix @@ -12,6 +12,7 @@ in "$modifier,Return,exec,${terminal}" "$modifier,K,exec,list-keybinds" "$modifier SHIFT,Return,exec,rofi-launcher" + "$modifier ,R,exec,rofi-launcher" "$modifier SHIFT,W,exec,web-search" "$modifier ALT,W,exec,wallsetter" "$modifier SHIFT,N,exec,swaync-client -rs" diff --git a/modules/home/waybar/waybar-dwm-2.nix b/modules/home/waybar/waybar-dwm-2.nix index 202d152..862f609 100644 --- a/modules/home/waybar/waybar-dwm-2.nix +++ b/modules/home/waybar/waybar-dwm-2.nix @@ -199,7 +199,7 @@ margin: 0; padding: 0; font-family: "JetBrains Mono Nerd Font"; - font-size: 10pt; + font-size: 14pt; font-weight: 700; padding-bottom: 0px; } diff --git a/UPGRADE-2.3-to-2.4.es.md b/modules/src/UPGRADE-2.3-to-2.4.es.md similarity index 100% rename from UPGRADE-2.3-to-2.4.es.md rename to modules/src/UPGRADE-2.3-to-2.4.es.md diff --git a/UPGRADE-2.3-to-2.4.md b/modules/src/UPGRADE-2.3-to-2.4.md similarity index 100% rename from UPGRADE-2.3-to-2.4.md rename to modules/src/UPGRADE-2.3-to-2.4.md diff --git a/ZaneyOS-Upgrade.es.md b/modules/src/ZaneyOS-Upgrade.es.md similarity index 100% rename from ZaneyOS-Upgrade.es.md rename to modules/src/ZaneyOS-Upgrade.es.md diff --git a/ZaneyOS-Upgrade.md b/modules/src/ZaneyOS-Upgrade.md similarity index 100% rename from ZaneyOS-Upgrade.md rename to modules/src/ZaneyOS-Upgrade.md diff --git a/modules/src/ZaneyOS-stable-2.4-announcement.es.md b/modules/src/ZaneyOS-stable-2.4-announcement.es.md new file mode 100644 index 0000000..0bd2ea9 --- /dev/null +++ b/modules/src/ZaneyOS-stable-2.4-announcement.es.md @@ -0,0 +1,35 @@ +# ¡ZaneyOS v2.4 ya está aquí! 🚀 + +Nos complace anunciar ZaneyOS v2.4: una versión centrada en mejorar la experiencia de escritorio, simplificar la personalización y fortalecer las herramientas. + +Destacados +- Nuevo gestor de inicio predeterminado: SDDM con un greeter tematizado para una experiencia de inicio pulida +- Conmutadores de funciones en las variables del host: Activa o desactiva componentes fácilmente en `hosts//variables.nix` + - Terminales (kitty, wezterm, ghostty, alacritty) + - Perfiles de Waybar y animaciones + - Thunar, impresión, NFS, elección de navegador, etc. + - Selección del gestor de inicio mediante `displayManager` +- zcli actualizado: mejores flujos y utilidades (incluye bootstrap para Doom Emacs) +- Doom Emacs: interruptor de primera clase + ruta de instalación más sencilla (`zcli doom install` tras habilitarlo) +- Estructura de configuración mejorada: separación más clara, actualizaciones más seguras y valores por defecto más coherentes +- Mejoras en Fastfetch: muestra la versión de ZaneyOS de forma dinámica +- Documentación: ha empezado el esfuerzo de traducción al español (¡gracias!) + +Enlaces +- GitLab: https://gitlab.com/zaney/zaneyos +- README: https://gitlab.com/zaney/zaneyos/-/blob/stable-2.4/README.md + + + +⚠️ NOTAS IMPORTANTES DE ACTUALIZACIÓN (LEE ESTO) +- El script de actualización SOLO está pensado para pasar de v2.3 → v2.4. +- Si tienes una v2.3 muy modificada, NO uses el script de actualización. Considera una instalación limpia de v2.4 y migra tus cambios manualmente. +- Copias de seguridad: Los scripts de instalación y actualización hacen copia de tu `~/zaneyos` actual, pero recomendamos encarecidamente que hagas tu propia copia de seguridad adicional. +- Reversión: Hay un script de reversión (por ejemplo, `./revert-to-2.3.sh`) si necesitas volver atrás usando tu copia de seguridad. +- Alcance: No podemos probar todas las combinaciones y personalizaciones posibles al actualizar de v2.3 a v2.4. Procede con cuidado y revisa las diferencias. + +Nota sobre la rama +- v2.4 está publicada en la rama `stable-2.4`. + +¡Gracias por usar ZaneyOS! 🎉 + diff --git a/modules/src/ZaneyOS-stable-2.4-announcement.md b/modules/src/ZaneyOS-stable-2.4-announcement.md new file mode 100644 index 0000000..9c2cf06 --- /dev/null +++ b/modules/src/ZaneyOS-stable-2.4-announcement.md @@ -0,0 +1,35 @@ +# ZaneyOS v2.4 is out! 🚀 + +We’re excited to announce ZaneyOS v2.4 — a quality-of-life release focused on a smoother desktop experience, simpler customization, and better tooling. + +Highlights +- New default display manager: SDDM with a themed greeter for a polished login experience +- Feature toggles in host variables: Easily enable/disable components in `hosts//variables.nix` + - Terminals (kitty, wezterm, ghostty, alacritty) + - Waybar presets and animations + - Thunar, Printing, NFS, Browser choice, etc. + - Display manager selection via `displayManager` +- Updated zcli: Better workflows and helpers (including Doom Emacs bootstrap) +- Doom Emacs: First-class toggle + smoother install path (`zcli doom install` after enabling) +- Improved configuration structure: Clearer separation, safer upgrades, and more consistent defaults +- Fastfetch enhancements: Shows ZaneyOS version dynamically +- Documentation: Spanish translation effort has begun (¡gracias!) + +Links +- GitLab: https://gitlab.com/zaney/zaneyos +- README: https://gitlab.com/zaney/zaneyos/-/blob/stable-2.4/README.md + + + +⚠️ IMPORTANT UPGRADE NOTES (PLEASE READ) +- The upgrade script is ONLY intended for upgrades from v2.3 → v2.4. +- If you have a heavily modified v2.3, do NOT use the upgrade script. Consider a fresh install of v2.4 and manually migrate your changes. +- Backups: The install and upgrade scripts back up your current `~/zaneyos`, but we strongly recommend making your own backup as well. +- Revert: A revert script is provided (e.g., `./revert-to-2.3.sh`) if you need to roll back using your backup. +- Scope: We cannot test every possible customization and combination when upgrading from v2.3 to v2.4. Proceed with care and review differences. + +Branch note +- v2.4 is published on the `stable-2.4` branch. + +Thank you for using ZaneyOS! 🎉 + diff --git a/compare-zaneyos-config.sh b/modules/src/compare-zaneyos-config.sh similarity index 100% rename from compare-zaneyos-config.sh rename to modules/src/compare-zaneyos-config.sh diff --git a/revert-to-2.3.sh b/modules/src/revert-to-2.3.sh similarity index 100% rename from revert-to-2.3.sh rename to modules/src/revert-to-2.3.sh diff --git a/upgrade-2.3-to-2.4.sh b/modules/src/upgrade-2.3-to-2.4.sh similarity index 92% rename from upgrade-2.3-to-2.4.sh rename to modules/src/upgrade-2.3-to-2.4.sh index 256a17a..7446b5f 100755 --- a/upgrade-2.3-to-2.4.sh +++ b/modules/src/upgrade-2.3-to-2.4.sh @@ -858,14 +858,87 @@ else print_warning "No backup found for modules/core/packages.nix - using defaults" fi +# Function to detect and update flake.nix with user's actual configuration +update_flake_configuration() { + print_header "Updating Flake Configuration" + + # Detect current username (prefer from old config, fallback to current user) + local detected_username + if [ -n "${HOST_DIRS[0]}" ] && [ -f "$BACKUP_DIR/zaneyos/hosts/${HOST_DIRS[0]}/variables.nix" ]; then + detected_username=$(grep 'gitUsername' "$BACKUP_DIR/zaneyos/hosts/${HOST_DIRS[0]}/variables.nix" | sed 's/.*= *"\([^"]*\)".*/\1/' | head -1) + fi + detected_username=${detected_username:-$(whoami)} + + # Detect current hostname (prefer from system, fallback to first host directory) + local detected_hostname=$(hostname) + if [[ "$detected_hostname" == "nixos" ]] || [[ -z "$detected_hostname" ]]; then + detected_hostname=${HOST_DIRS[0]} + fi + + # Detect GPU profile from hardware or ask user + local detected_profile="vm" # default fallback + print_info "Detecting GPU profile..." + + # Check for NVIDIA + if lspci | grep -i nvidia >/dev/null 2>&1; then + # Check if it's a laptop/mobile GPU + if lspci | grep -i nvidia | grep -i "mobile\|laptop" >/dev/null 2>&1; then + detected_profile="nvidia-laptop" + else + detected_profile="nvidia" + fi + # Check for AMD + elif lspci | grep -i amd | grep -i "VGA\|Display" >/dev/null 2>&1; then + detected_profile="amd" + # Check for Intel + elif lspci | grep -i intel | grep -i "VGA\|Display" >/dev/null 2>&1; then + detected_profile="intel" + # Check if we're in a VM environment + elif systemd-detect-virt >/dev/null 2>&1; then + detected_profile="vm" + print_info "Virtual machine environment detected" + fi + + print_info "Detected configuration:" + print_info " Username: $detected_username" + print_info " Hostname: $detected_hostname" + print_info " GPU Profile: $detected_profile" + + # Confirm with user before updating + echo "" + prompt_yes "Update flake.nix with detected configuration? (Y/N):" + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + print_warning "Skipping flake.nix update - using current values" + return 0 + fi + + # Update flake.nix with detected values + print_info "Updating flake.nix..." + sed -i "s/username = \"[^\"]*\";/username = \"$detected_username\";/" ./flake.nix + sed -i "s/host = \"[^\"]*\";/host = \"$detected_hostname\";/" ./flake.nix + sed -i "s/profile = \"[^\"]*\";/profile = \"$detected_profile\";/" ./flake.nix + + print_success "✓ Updated flake.nix with detected configuration" + + # Show what was updated + print_info "Updated flake.nix contents:" + echo -e "${CYAN}$(grep -A 3 -E 'host =|username =|profile =' ./flake.nix)${NC}" + echo "" +} + +# Update flake.nix with user's actual configuration +update_flake_configuration + print_header "Building ZaneyOS 2.4" print_warning "Using 'boot' option to avoid SDDM display issues" print_info "This is safer than 'switch' when changing display managers" -# Get the profile from flake.nix -PROFILE=$(grep 'profile = ' ./flake.nix | sed 's/.*= *"\([^"]*\)".*/\1/') -print_info "Detected profile: $PROFILE" +# Get the GPU profile from flake.nix (this determines which nixosConfiguration to use) +# The actual build target is the GPU profile (amd, nvidia, nvidia-laptop, intel, vm) +# not the internal 'profile' variable which is just passed to modules +GPU_PROFILE=$(grep 'profile = ' ./flake.nix | sed 's/.*= *"\([^"]*\)".*/\1/') +print_info "Using GPU profile for build: $GPU_PROFILE" # Build the system echo "" @@ -882,12 +955,12 @@ BUILD_SUCCESS=false if [ "$USE_NH" = true ]; then print_info "Using NH for build..." - if nh os boot ~/zaneyos --hostname "$PROFILE"; then + if nh os boot ~/zaneyos --hostname "$GPU_PROFILE"; then BUILD_SUCCESS=true fi else print_info "Using nixos-rebuild for build..." - if sudo nixos-rebuild boot --flake ~/zaneyos/#"$PROFILE"; then + if sudo nixos-rebuild boot --flake ~/zaneyos/#"$GPU_PROFILE"; then BUILD_SUCCESS=true fi fi