nixos/tests: Fix usage of head function without pkgs.lib