diff options
author | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-07-28 22:27:18 -0300 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-08-01 10:12:12 +0000 |
commit | 871bf7c87545eeaf67d594d14f33f8bfc18674ac (patch) | |
tree | 2b77f8f1ec9b560cad12cb17220945086349362e | |
parent | 2dd9923c8aa058b7b2df28a6dfdae40d7defe3e3 (diff) | |
download | nixpkgs-871bf7c87545eeaf67d594d14f33f8bfc18674ac.tar nixpkgs-871bf7c87545eeaf67d594d14f33f8bfc18674ac.tar.gz nixpkgs-871bf7c87545eeaf67d594d14f33f8bfc18674ac.tar.bz2 nixpkgs-871bf7c87545eeaf67d594d14f33f8bfc18674ac.tar.lz nixpkgs-871bf7c87545eeaf67d594d14f33f8bfc18674ac.tar.xz nixpkgs-871bf7c87545eeaf67d594d14f33f8bfc18674ac.tar.zst nixpkgs-871bf7c87545eeaf67d594d14f33f8bfc18674ac.zip |
nixos/tests/systemd-initrd-networkd-ssh.nix: remove overuses of `with`
-rw-r--r-- | nixos/tests/systemd-initrd-networkd-ssh.nix | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/nixos/tests/systemd-initrd-networkd-ssh.nix b/nixos/tests/systemd-initrd-networkd-ssh.nix index 30bd1950de2..6aaa6c828f7 100644 --- a/nixos/tests/systemd-initrd-networkd-ssh.nix +++ b/nixos/tests/systemd-initrd-networkd-ssh.nix @@ -2,15 +2,16 @@ import ./make-test-python.nix ({ lib, ... }: { name = "systemd-initrd-network-ssh"; meta.maintainers = [ lib.maintainers.elvishjerricco ]; - nodes = with lib; { + nodes = { server = { config, pkgs, ... }: { - environment.systemPackages = [pkgs.cryptsetup]; + environment.systemPackages = [ pkgs.cryptsetup ]; boot.loader.systemd-boot.enable = true; boot.loader.timeout = 0; virtualisation = { emptyDiskImages = [ 4096 ]; useBootLoader = true; - # Booting off the encrypted disk requires an available init script from the Nix store + # Booting off the encrypted disk requires an available init script from + # the Nix store mountHostNixStore = true; useEFIBoot = true; }; @@ -26,7 +27,7 @@ import ./make-test-python.nix ({ lib, ... }: { enable = true; ssh = { enable = true; - authorizedKeys = [ (readFile ./initrd-network-ssh/id_ed25519.pub) ]; + authorizedKeys = [ (lib.readFile ./initrd-network-ssh/id_ed25519.pub) ]; port = 22; # Terrible hack so it works with useBootLoader hostKeys = [ { outPath = "${./initrd-network-ssh/ssh_host_ed25519_key}"; } ]; @@ -38,13 +39,13 @@ import ./make-test-python.nix ({ lib, ... }: { client = { config, ... }: { 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 ./initrd-network-ssh/ssh_host_ed25519_key.pub}" + "${lib.readFile ./initrd-network-ssh/ssh_host_ed25519_key.pub}" ]; }; sshKey = { |