nixos/lxc/container: fix useDhcp with veth (#358806)
This commit is contained in:
commit
6de1312a38
@ -31,6 +31,22 @@
|
|||||||
${config.nix.package.out}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
|
${config.nix.package.out}/bin/nix-env -p /nix/var/nix/profiles/system --set /run/current-system
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# supplement 99-ethernet-default-dhcp which excludes veth
|
||||||
|
systemd.network = lib.mkIf config.networking.useDHCP {
|
||||||
|
networks."99-lxc-veth-default-dhcp" = {
|
||||||
|
matchConfig = {
|
||||||
|
Type = "ether";
|
||||||
|
Kind = "veth";
|
||||||
|
Name = [
|
||||||
|
"en*"
|
||||||
|
"eth*"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
DHCP = "yes";
|
||||||
|
networkConfig.IPv6PrivacyExtensions = "kernel";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
system.build.tarball = pkgs.callPackage ../../lib/make-system-tarball.nix {
|
system.build.tarball = pkgs.callPackage ../../lib/make-system-tarball.nix {
|
||||||
extraArgs = "--owner=0";
|
extraArgs = "--owner=0";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user