Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The options domain does not exist. #48

Open
ncrmro opened this issue Jun 21, 2024 · 1 comment
Open

The options domain does not exist. #48

ncrmro opened this issue Jun 21, 2024 · 1 comment

Comments

@ncrmro
Copy link

ncrmro commented Jun 21, 2024

Hello whenever I add NixVirt.lib to my modules I get the following error. (I'm pretty new with Nix and NixOS).

       error: The option `domain' does not exist. Definition values:
       - In `/nix/store/dydg48djlykksz8cxq0xjplyxpa9pvf4-source/flake.nix':
           {
             getXML = <function>;
             templates = {
               linux = <function, args: {install_vol?, memory?, name, storage_vol, uuid, virtio_drive?, virtio_video?}>;
               mkstorage = <function>;
           ...

I've slimmed down a few optionsj.

{
  description = "A simple NixOS flake";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";

    # Used for secure boot
    lanzaboote = {
      url = "github:nix-community/lanzaboote/v0.3.0";
      # Optional but recommended to limit the size of your system closure.
      inputs.nixpkgs.follows = "nixpkgs";
    };
    nur.url = "github:nix-community/NUR";

    home-manager.url = "github:nix-community/home-manager";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
    NixVirt = {
      url = "https://flakehub.com/f/AshleyYakeley/NixVirt/0.5.0.tar.gz";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = {
    self,
    nixpkgs,
    lanzaboote,
    home-manager,
    nur,
    NixVirt,
    ...
  } @ inputs: {
    nixosConfigurations."ncrmro-workstation" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        NixVirt.nixosModules.default
        #        NixVirt.lib
        lanzaboote.nixosModules.lanzaboote
        home-manager.nixosModules.home-manager
        nur.nixosModules.nur
        ./configuration.nix
        ./flakes/virtualisation.nix
        ({
          pkgs,
          lib,
          ...
        }: {
          networking.useDHCP = false;
          networking.bridges."br0".interfaces = ["eno1" "eno2"];
          networking.interfaces."br0".useDHCP = true;
        })
      ];
    };
  };
}

{
  config,
  lib,
  pkgs,
  nixpkgs,
  ollama,
  nixvirt,
  ...
}: {
  fileSystems."/virt/machines" = {
    device = "rpool/virt/machines";
    fsType = "zfs";
  };

  fileSystems."/virt/installers" = {
    device = "rpool/virt/installers";
    fsType = "zfs";
  };
  home-manager.users.ncrmro = {
    /*
    The home.stateVersion option does not have a default and must be set
    */
    home.stateVersion = "19.09";

    programs.git = {
      enable = true;
      userName = "ncrmro";
      userEmail = "[email protected]";
    };
  };
  virtualisation.libvirt.enable = true;
  virtualisation.libvirt.swtpm.enable = false;

  virtualisation.libvirt.connections."qemu:///system".domains = [
  ];

  virtualisation.libvirt.connections."qemu:///system".networks = [
  ];

  virtualisation.libvirt.connections."qemu:///system".pools = [
  ];
}

@AshleyYakeley
Copy link
Owner

I can't see anything obviously wrong. Do you have more logging from the error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants