aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/tests/systemd-networkd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/tests/systemd-networkd.nix')
-rw-r--r--nixpkgs/nixos/tests/systemd-networkd.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/nixpkgs/nixos/tests/systemd-networkd.nix b/nixpkgs/nixos/tests/systemd-networkd.nix
index 319e5e94ece..d5fb2431dba 100644
--- a/nixpkgs/nixos/tests/systemd-networkd.nix
+++ b/nixpkgs/nixos/tests/systemd-networkd.nix
@@ -7,18 +7,19 @@ 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;
- FwMark = 42;
+ FirewallMark = 42;
};
wireguardPeers = [ {wireguardPeerConfig={
Endpoint = "192.168.1.${peerId}:51820";