From b73e12e32ba9c0706b2b56c587f1e663caf319e0 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 14 Apr 2021 23:08:12 +0200 Subject: [PATCH] nixos-module/server/lxc-containers: fix hwaddr --- nix/nixos-module/server/lxc-containers.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nix/nixos-module/server/lxc-containers.nix b/nix/nixos-module/server/lxc-containers.nix index 367c51c..256306d 100644 --- a/nix/nixos-module/server/lxc-containers.nix +++ b/nix/nixos-module/server/lxc-containers.nix @@ -21,9 +21,9 @@ let type = ifData.type; name = netName; flags = "up"; - hwaddr = if ifData ? hwaddr + hwaddr = if ifData ? hwaddr && ifData.hwaddr != null then ifData.hwaddr - else "0A:14:48:01:26:00"; + else "0A:14:48:xx:xx:xx"; } // (lib.optionalAttrs (ifData.type == "veth") { veth.pair = "${ctName}-${netName}"; veth.mode = "bridge"; @@ -54,7 +54,7 @@ let builtins.concatStringsSep "" ( map ({ e, i }: serialize "${name}.${toString i}" e) (enumerate x 0) ) - else throw "Invalid data in lxc net config: ${lib.generators.toPretty {} x}"; + else throw "Invalid data in lxc net config for ${name}: ${lib.generators.toPretty {} x}"; in serialize "lxc.net" config;