nixos-generators icon indicating copy to clipboard operation
nixos-generators copied to clipboard

The FQDN is required but cannot be determined. Please make sure that

Open shymega opened this issue 1 year ago • 4 comments

I can't build Proxmox LXC images at the moment. (config)

It looks like an upstream Nixpkgs issue, but I'm opening an issue here for reference.

I will do some digging...

Output:

$ nix build .\#packages.MTX-SRV
error:
       … while calling the 'derivationStrict' builtin

         at /builtin/derivation.nix:9:12: (source not available)

       … while evaluating derivation 'tarball'
         whose name attribute is located at /nix/store/5z81la6av4j0ckp0w1949lxiwjyyykks-source/pkgs/stdenv/generic/make-derivation.nix:333:7

       … while evaluating attribute 'buildCommand' of derivation 'tarball'

         at /nix/store/5z81la6av4j0ckp0w1949lxiwjyyykks-source/pkgs/build-support/trivial-builders/default.nix:68:16:

           67|         enableParallelBuilding = true;
           68|         inherit buildCommand name;
             |                ^
           69|         passAsFile = [ "buildCommand" ]

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: The FQDN is required but cannot be determined. Please make sure that
       both networking.hostName and networking.domain are set properly.

shymega avatar Aug 25 '24 09:08 shymega

Yep. Needs to be fixed in nixpkgs.

Mic92 avatar Aug 25 '24 14:08 Mic92

This was my fix.

I'm not sure if Nixpkgs needs the fix.

shymega avatar Sep 01 '24 09:09 shymega

I'm having the same issue. @shymega could you post the fix here?

alirezamirsepassi avatar Nov 18 '24 11:11 alirezamirsepassi

@alirezamirsepassi My fix was:

{ inputs, ... }: {
  imports = [inputs.nixos-generators.nixosModules.all-formats];

  formatConfigs.proxmox-lxc = {
    proxmoxLXC.manageHostName = true;
  };
}

shymega avatar Dec 02 '24 21:12 shymega