add compatibility with Nix PR #6530 (Source tree abstraction)

Avoid adding flake resource paths to the store (via string
interpolation).
This reduces performance and can lead to modules getting imported
twice, once through a local path and once through a store path.

This might not be needed in a future Nix release, in which case we can
revert this.
This commit is contained in:
Erik Arvstedt 2022-10-22 19:37:47 +02:00
parent 3c816b862c
commit 73d2fbb448
No known key found for this signature in database
GPG key ID: 33312B944DD97846
7 changed files with 13 additions and 13 deletions

View file

@ -6,12 +6,12 @@ in
import "${nixpkgs}/nixos/tests/make-test-python.nix" ({ pkgs, ... }:
with pkgs.lib;
let
keyDir = "${nixpkgs}/nixos/tests/initrd-network-ssh";
keyDir = nixpkgs + "/nixos/tests/initrd-network-ssh";
keys = {
server = "${keyDir}/ssh_host_ed25519_key";
client = "${keyDir}/id_ed25519";
serverPub = readFile "${keys.server}.pub";
clientPub = readFile "${keys.client}.pub";
server = keyDir + "/ssh_host_ed25519_key";
client = keyDir + "/id_ed25519";
serverPub = readFile (keys.server + ".pub");
clientPub = readFile (keys.client + ".pub");
};
clientBaseConfig = {

View file

@ -1,6 +1,6 @@
pkgs:
let
pythonTesting = import "${toString pkgs.path}/nixos/lib/testing-python.nix" {
pythonTesting = import (pkgs.path + "/nixos/lib/testing-python.nix") {
system = pkgs.stdenv.hostPlatform.system;
inherit pkgs;
};

View file

@ -89,7 +89,7 @@ name: testConfig:
vmWithoutTests = (pkgs.nixos ({ config, ... }: {
imports = [
testConfig
"${toString pkgs.path}/nixos/modules/virtualisation/qemu-vm.nix"
(pkgs.path + "/nixos/modules/virtualisation/qemu-vm.nix")
];
virtualisation.graphics = false;
services.getty.autologinUser = "root";