Merge pull request #96690 from NinjaTrappeur/nin-networkd-test-fix-flakiness
nixosTests.systemd-networkd: fix test flakiness
This commit is contained in:
commit
3e65f88623
@ -7,16 +7,17 @@ let generateNodeConf = { lib, pkgs, config, privk, pubk, peerId, nodeId, ...}: {
|
||||
virtualisation.vlans = [ 1 ];
|
||||
environment.systemPackages = with pkgs; [ wireguard-tools ];
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.wireguard ];
|
||||
systemd.tmpfiles.rules = [
|
||||
"f /run/wg_priv 0640 root systemd-network - ${privk}"
|
||||
];
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
netdevs = {
|
||||
"90-wg0" = {
|
||||
netdevConfig = { Kind = "wireguard"; Name = "wg0"; };
|
||||
wireguardConfig = {
|
||||
PrivateKeyFile = "/run/wg_priv";
|
||||
# NOTE: we're storing the wireguard private key in the
|
||||
# store for this test. Do not do this in the real
|
||||
# world. Keep in mind the nix store is
|
||||
# world-readable.
|
||||
PrivateKeyFile = pkgs.writeText "wg0-priv" privk;
|
||||
ListenPort = 51820;
|
||||
FirewallMark = 42;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user