nixos/tests/initrd-network-ssh/default.nix: remove overuses of with

This commit is contained in:
Anderson Torres 2023-07-28 22:27:17 -03:00
parent c532a4f227
commit 62f6f01085

View File

@ -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 = {