XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Home
    2. dalem
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Groups 1

    dalem

    @dalem

    Pro Support Team
    4
    Reputation
    3
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online
    Location Kansas City, MO

    dalem Unfollow Follow
    Pro Support Team

    Best posts made by dalem

    • NiXOA: A declarative implementation of Xen Orchestra using flakes on NixOS

      I have created two Nix flakes for running Xen Orchestra inside a NixOS virtual machine on XCP-ng. I am a strong supporter of Nix and NixOS, and I was interested in the idea of building Xen Orchestra from source in a fully declarative way.

      Requirements

      Before you begin, you need:
      • A virtual machine running NixOS
      • Flakes enabled (either in your system configuration or in your current shell)
      • The git package installed

      Flake Overview

      There are two flakes:

      NiXOA-VM

      This is the main flake of the project. It includes:

      • A Xen Orchestra package built from source
      • A libvhdi Nix module
      • Update and maintenance modules
      • System and user configuration modules
      • Xen guest tools (via xen-guest-agent)
      • Support for a separate user-config flake

      This flake is where the Xen Orchestra service and core functions are defined. It is not intended to be user editable when using it.

      User-config

      This flake contains your machine-specific settings.
      Editing configuration.nix is used for basic system settings such as:

      • Hostname
      • Username
      • Time zone
      • SSH keys

      hardware-configuration.nix
      You must copy this file from /etc/nixos/hardware-configuration.nix into the root of the user-config directory.

      While you're at it, go ahead and update hardware-configuration.nix to have a swap file (you can ignore this if you set a swap file in the NixOS installer) by adding the following lines to the config:

      swapDevices = [
                   {
                     device = "/swapfile";
                     size = 4096;  # in MB (4GB)
                   }
               ];
      

      Making Customizations

      There are helper scripts to simplify setup. In the future, these may be replaced with a text-based user interface (TUI).

      In most cases, you will only need to edit:

      • configuration.nix – system-level settings
      • home.nix (optional) – if you want more control using Home Manager
      • config.nixoa.toml – only if you have custom Xen Orchestra server settings

      You usually do not need to edit config.nixoa.toml. If you do, avoid changing the Redis, sudo, or HTTPS mount settings unless you know exactly what you are doing, as this can break the system.

      Building the System

      After you finish editing your configuration:

      • Go to the user-config directory
      • Update inputs from nixoa-vm:
      nix flake update
      
      • Add all changed files (including hardware-configuration.nix):
      git add *
      
      • Commit your changes:
      git commit -m "Initial configuration"
      
      • Rebuild the system:
      sudo nixos-rebuild switch --flake .#nixoa
      

      (Replace nixoa if you changed the hostname.)

      Installer

      The documentation mentions an installer that automates most of these steps. It exists, but it still needs more testing and should be considered experimental.

      Optional Shell Enhancements

      If you change the shell for the xoa user from bash to zsh in configuration.nix, the system will automatically install several quality-of-life tools, including:

      • oh-my-posh
      • fzf
      • zoxide
      • eza
      • bat
      • and other terminal enhancements

      This is a personal passion project that I built on my own. If you are interested, please take a look and share any feedback or suggestions:

      https://codeberg.org/NiXOA

      posted in Infrastructure as Code nixos
      dalemD
      dalem
    • RE: NiXOA: A declarative implementation of Xen Orchestra using flakes on NixOS

      Version 1.4.0 is released: https://codeberg.org/NiXOA/system/releases/tag/v1.4.0

      It includes significant changes and improvements, including: dedicated getting started section, migration to valkey, only needing to clone system, and helper scripts.

      the xen-orchestra-ce nixpkg now references the libvhdi nixpkg, and the core flake now references and pulls from the xen-orchestra-ce repo as an overlay. System (the user input flake) now uses the Core repo as an overlay, reducing the need to clone both locally AND allowing system to pull new updates and releases from core. XO, and libvhdi as needed.

      The next goal is:
      Make an xsconsole-like TUI
      Automate package updates for libvhdi and xen-orchestra-ce using CI/CD pipelines
      Submit libvhdi and xen-orchestra-ce as official nixpkgs

      posted in Infrastructure as Code
      dalemD
      dalem

    Latest posts made by dalem

    • RE: NiXOA: A declarative implementation of Xen Orchestra using flakes on NixOS

      Version 1.4.0 is released: https://codeberg.org/NiXOA/system/releases/tag/v1.4.0

      It includes significant changes and improvements, including: dedicated getting started section, migration to valkey, only needing to clone system, and helper scripts.

      the xen-orchestra-ce nixpkg now references the libvhdi nixpkg, and the core flake now references and pulls from the xen-orchestra-ce repo as an overlay. System (the user input flake) now uses the Core repo as an overlay, reducing the need to clone both locally AND allowing system to pull new updates and releases from core. XO, and libvhdi as needed.

      The next goal is:
      Make an xsconsole-like TUI
      Automate package updates for libvhdi and xen-orchestra-ce using CI/CD pipelines
      Submit libvhdi and xen-orchestra-ce as official nixpkgs

      posted in Infrastructure as Code
      dalemD
      dalem
    • RE: NiXOA: A declarative implementation of Xen Orchestra using flakes on NixOS

      @afk Great question! I’ve decided the best path forward is to create some GitHub mirrors and then submit the libvhdi package upstream, wait for that to get approved, and then submit the Xen-orchestra-ce package since it’s dependent on libvhdi, it’ll take a while but having them both as upstream nix packages is the goal

      posted in Infrastructure as Code
      dalemD
      dalem
    • NiXOA: A declarative implementation of Xen Orchestra using flakes on NixOS

      I have created two Nix flakes for running Xen Orchestra inside a NixOS virtual machine on XCP-ng. I am a strong supporter of Nix and NixOS, and I was interested in the idea of building Xen Orchestra from source in a fully declarative way.

      Requirements

      Before you begin, you need:
      • A virtual machine running NixOS
      • Flakes enabled (either in your system configuration or in your current shell)
      • The git package installed

      Flake Overview

      There are two flakes:

      NiXOA-VM

      This is the main flake of the project. It includes:

      • A Xen Orchestra package built from source
      • A libvhdi Nix module
      • Update and maintenance modules
      • System and user configuration modules
      • Xen guest tools (via xen-guest-agent)
      • Support for a separate user-config flake

      This flake is where the Xen Orchestra service and core functions are defined. It is not intended to be user editable when using it.

      User-config

      This flake contains your machine-specific settings.
      Editing configuration.nix is used for basic system settings such as:

      • Hostname
      • Username
      • Time zone
      • SSH keys

      hardware-configuration.nix
      You must copy this file from /etc/nixos/hardware-configuration.nix into the root of the user-config directory.

      While you're at it, go ahead and update hardware-configuration.nix to have a swap file (you can ignore this if you set a swap file in the NixOS installer) by adding the following lines to the config:

      swapDevices = [
                   {
                     device = "/swapfile";
                     size = 4096;  # in MB (4GB)
                   }
               ];
      

      Making Customizations

      There are helper scripts to simplify setup. In the future, these may be replaced with a text-based user interface (TUI).

      In most cases, you will only need to edit:

      • configuration.nix – system-level settings
      • home.nix (optional) – if you want more control using Home Manager
      • config.nixoa.toml – only if you have custom Xen Orchestra server settings

      You usually do not need to edit config.nixoa.toml. If you do, avoid changing the Redis, sudo, or HTTPS mount settings unless you know exactly what you are doing, as this can break the system.

      Building the System

      After you finish editing your configuration:

      • Go to the user-config directory
      • Update inputs from nixoa-vm:
      nix flake update
      
      • Add all changed files (including hardware-configuration.nix):
      git add *
      
      • Commit your changes:
      git commit -m "Initial configuration"
      
      • Rebuild the system:
      sudo nixos-rebuild switch --flake .#nixoa
      

      (Replace nixoa if you changed the hostname.)

      Installer

      The documentation mentions an installer that automates most of these steps. It exists, but it still needs more testing and should be considered experimental.

      Optional Shell Enhancements

      If you change the shell for the xoa user from bash to zsh in configuration.nix, the system will automatically install several quality-of-life tools, including:

      • oh-my-posh
      • fzf
      • zoxide
      • eza
      • bat
      • and other terminal enhancements

      This is a personal passion project that I built on my own. If you are interested, please take a look and share any feedback or suggestions:

      https://codeberg.org/NiXOA

      posted in Infrastructure as Code nixos
      dalemD
      dalem