From 62f6f01085a36111d92ec7617c6958f67de9235a Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Fri, 28 Jul 2023 22:27:17 -0300 Subject: [PATCH] nixos/tests/initrd-network-ssh/default.nix: remove overuses of `with` --- nixos/tests/initrd-network-ssh/default.nix | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/nixos/tests/initrd-network-ssh/default.nix b/nixos/tests/initrd-network-ssh/default.nix index 017de6882081..17b6c21ff1e9 100644 --- a/nixos/tests/initrd-network-ssh/default.nix +++ b/nixos/tests/initrd-network-ssh/default.nix @@ -1,12 +1,10 @@ -import ../make-test-python.nix ({ lib, ... }: +import ../make-test-python.nix ({ lib, pkgs, ... }: { name = "initrd-network-ssh"; - meta = with lib.maintainers; { - maintainers = [ willibutz emily ]; - }; + meta.maintainers = with lib.maintainers; [ willibutz emily ]; - nodes = with lib; { + nodes = { server = { config, ... }: { @@ -17,7 +15,7 @@ import ../make-test-python.nix ({ lib, ... }: enable = true; ssh = { enable = true; - authorizedKeys = [ (readFile ./id_ed25519.pub) ]; + authorizedKeys = [ (lib.readFile ./id_ed25519.pub) ]; port = 22; hostKeys = [ ./ssh_host_ed25519_key ]; }; @@ -37,12 +35,12 @@ import ../make-test-python.nix ({ lib, ... }: { environment.etc = { knownHosts = { - text = concatStrings [ + text = lib.concatStrings [ "server," - "${toString (head (splitString " " ( - toString (elemAt (splitString "\n" config.networking.extraHosts) 2) + "${toString (lib.head (lib.splitString " " ( + toString (lib.elemAt (lib.splitString "\n" config.networking.extraHosts) 2) )))} " - "${readFile ./ssh_host_ed25519_key.pub}" + "${lib.readFile ./ssh_host_ed25519_key.pub}" ]; }; sshKey = {