Created
April 11, 2020 17:16
-
-
Save Thra11/801d8f5dc146e4b62732d659639b734c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
networking.macvlans.mv-wlan0-host = { | |
interface = "wlan0"; | |
mode = "bridge"; | |
}; | |
networking.interfaces.wlan0.ipv4.addresses = pkgs.lib.mkForce []; | |
networking.interfaces.mv-wlan0 = { | |
ipv4.addresses = [ { address = "192.168.1.1"; prefixLength = 24; } ]; | |
}; | |
containers.my-container = { | |
autoStart = true; | |
macvlans = [ "wlan0" ]; | |
config = { config, pkgs, ... }: | |
{ | |
networking.interfaces.mv-wlan0 = { | |
ipv4.addresses = [ { address = "192.168.1.20"; prefixLength = 24; } ]; | |
}; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment