mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixos/tests/initrd-network-ssh/default.nix: remove overuses of with
This commit is contained in:
parent
c532a4f227
commit
62f6f01085
@ -1,12 +1,10 @@
|
|||||||
import ../make-test-python.nix ({ lib, ... }:
|
import ../make-test-python.nix ({ lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "initrd-network-ssh";
|
name = "initrd-network-ssh";
|
||||||
meta = with lib.maintainers; {
|
meta.maintainers = with lib.maintainers; [ willibutz emily ];
|
||||||
maintainers = [ willibutz emily ];
|
|
||||||
};
|
|
||||||
|
|
||||||
nodes = with lib; {
|
nodes = {
|
||||||
server =
|
server =
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
@ -17,7 +15,7 @@ import ../make-test-python.nix ({ lib, ... }:
|
|||||||
enable = true;
|
enable = true;
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
authorizedKeys = [ (readFile ./id_ed25519.pub) ];
|
authorizedKeys = [ (lib.readFile ./id_ed25519.pub) ];
|
||||||
port = 22;
|
port = 22;
|
||||||
hostKeys = [ ./ssh_host_ed25519_key ];
|
hostKeys = [ ./ssh_host_ed25519_key ];
|
||||||
};
|
};
|
||||||
@ -37,12 +35,12 @@ import ../make-test-python.nix ({ lib, ... }:
|
|||||||
{
|
{
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
knownHosts = {
|
knownHosts = {
|
||||||
text = concatStrings [
|
text = lib.concatStrings [
|
||||||
"server,"
|
"server,"
|
||||||
"${toString (head (splitString " " (
|
"${toString (lib.head (lib.splitString " " (
|
||||||
toString (elemAt (splitString "\n" config.networking.extraHosts) 2)
|
toString (lib.elemAt (lib.splitString "\n" config.networking.extraHosts) 2)
|
||||||
)))} "
|
)))} "
|
||||||
"${readFile ./ssh_host_ed25519_key.pub}"
|
"${lib.readFile ./ssh_host_ed25519_key.pub}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
sshKey = {
|
sshKey = {
|
||||||
|
Loading…
Reference in New Issue
Block a user