Skip to content

Commit 3e834e1

Browse files
committed
nixos/tests: Fix usage of head function without pkgs.lib
1 parent 3a663f6 commit 3e834e1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

nixos/tests/bittorrent.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let
1616
miniupnpdConf = nodes: pkgs.writeText "miniupnpd.conf"
1717
''
1818
ext_ifname=eth1
19-
listening_ip=${(head nodes.router.config.networking.interfaces.eth2.ip4).address}/24
19+
listening_ip=${(pkgs.lib.head nodes.router.config.networking.interfaces.eth2.ip4).address}/24
2020
allow 1024-65535 192.168.2.0/24 1024-65535
2121
'';
2222

@@ -53,7 +53,7 @@ in
5353
{ environment.systemPackages = [ pkgs.transmission ];
5454
virtualisation.vlans = [ 2 ];
5555
networking.defaultGateway =
56-
(head nodes.router.config.networking.interfaces.eth2.ip4).address;
56+
(pkgs.lib.head nodes.router.config.networking.interfaces.eth2.ip4).address;
5757
networking.firewall.enable = false;
5858
};
5959

@@ -81,7 +81,7 @@ in
8181
# Create the torrent.
8282
$tracker->succeed("mkdir /tmp/data");
8383
$tracker->succeed("cp ${file} /tmp/data/test.tar.bz2");
84-
$tracker->succeed("transmission-create /tmp/data/test.tar.bz2 -t http://${(head nodes.tracker.config.networking.interfaces.eth1.ip4).address}:6969/announce -o /tmp/test.torrent");
84+
$tracker->succeed("transmission-create /tmp/data/test.tar.bz2 -t http://${(pkgs.lib.head nodes.tracker.config.networking.interfaces.eth1.ip4).address}:6969/announce -o /tmp/test.torrent");
8585
$tracker->succeed("chmod 644 /tmp/test.torrent");
8686
8787
# Start the tracker. !!! use a less crappy tracker

nixos/tests/nat.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import ./make-test.nix {
1313
{ virtualisation.vlans = [ 1 ];
1414
networking.firewall.allowPing = true;
1515
networking.defaultGateway =
16-
(head nodes.router.config.networking.interfaces.eth2.ip4).address;
16+
(pkgs.lib.head nodes.router.config.networking.interfaces.eth2.ip4).address;
1717
};
1818

1919
router =

0 commit comments

Comments
 (0)