Merge pull request 'don't add nixpkgs to nix registry to not conflict with nixpkgs' (#3096) from nixpkgs-conflict into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3096
This commit is contained in:
@@ -180,7 +180,7 @@
|
|||||||
self.packages.${pkgs.system}.clan-cli
|
self.packages.${pkgs.system}.clan-cli
|
||||||
] ++ self.packages.${pkgs.system}.clan-cli.runtimeDependencies;
|
] ++ self.packages.${pkgs.system}.clan-cli.runtimeDependencies;
|
||||||
environment.etc."install-closure".source = "${closureInfo}/store-paths";
|
environment.etc."install-closure".source = "${closureInfo}/store-paths";
|
||||||
virtualisation.memorySize = 2048;
|
virtualisation.memorySize = 3048;
|
||||||
nix.package = nixPackage;
|
nix.package = nixPackage;
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = lib.mkForce [ ];
|
substituters = lib.mkForce [ ];
|
||||||
|
|||||||
@@ -167,7 +167,7 @@
|
|||||||
self.packages.${pkgs.system}.clan-cli
|
self.packages.${pkgs.system}.clan-cli
|
||||||
] ++ self.packages.${pkgs.system}.clan-cli.runtimeDependencies;
|
] ++ self.packages.${pkgs.system}.clan-cli.runtimeDependencies;
|
||||||
environment.etc."install-closure".source = "${closureInfo}/store-paths";
|
environment.etc."install-closure".source = "${closureInfo}/store-paths";
|
||||||
virtualisation.memorySize = 2048;
|
virtualisation.memorySize = 3048;
|
||||||
nix.package = nixPackage;
|
nix.package = nixPackage;
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = lib.mkForce [ ];
|
substituters = lib.mkForce [ ];
|
||||||
|
|||||||
@@ -96,12 +96,6 @@ let
|
|||||||
|
|
||||||
networking.hostName = lib.mkDefault name;
|
networking.hostName = lib.mkDefault name;
|
||||||
|
|
||||||
# speeds up nix commands by using the nixpkgs from the host system (especially useful in VMs)
|
|
||||||
nix.registry.nixpkgs.to = lib.mkDefault {
|
|
||||||
type = "path";
|
|
||||||
path = lib.mkDefault nixpkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
# For vars we need to override the system so we run vars
|
# For vars we need to override the system so we run vars
|
||||||
# generators on the machine that runs `clan vars generate`. If a
|
# generators on the machine that runs `clan vars generate`. If a
|
||||||
# users is using the `pkgsForSystem`, we don't set
|
# users is using the `pkgsForSystem`, we don't set
|
||||||
|
|||||||
@@ -10,13 +10,16 @@ from tempfile import TemporaryDirectory
|
|||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from fixture_error import FixtureError
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from command import Command
|
from command import Command
|
||||||
from ports import PortFunction
|
from ports import PortFunction
|
||||||
|
|
||||||
|
|
||||||
|
class SshdError(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class Sshd:
|
class Sshd:
|
||||||
def __init__(self, port: int, proc: subprocess.Popen[str], key: str) -> None:
|
def __init__(self, port: int, proc: subprocess.Popen[str], key: str) -> None:
|
||||||
self.port = port
|
self.port = port
|
||||||
@@ -135,6 +138,10 @@ def sshd(
|
|||||||
extra_env=env,
|
extra_env=env,
|
||||||
)
|
)
|
||||||
monkeypatch.delenv("SSH_AUTH_SOCK", raising=False)
|
monkeypatch.delenv("SSH_AUTH_SOCK", raising=False)
|
||||||
|
|
||||||
|
timeout = 5
|
||||||
|
start_time = time.time()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
print(sshd_config.path)
|
print(sshd_config.path)
|
||||||
if (
|
if (
|
||||||
@@ -162,5 +169,8 @@ def sshd(
|
|||||||
rc = proc.poll()
|
rc = proc.poll()
|
||||||
if rc is not None:
|
if rc is not None:
|
||||||
msg = f"sshd processes was terminated with {rc}"
|
msg = f"sshd processes was terminated with {rc}"
|
||||||
raise FixtureError(msg)
|
raise SshdError(msg)
|
||||||
|
if time.time() - start_time > timeout:
|
||||||
|
msg = "Timeout while waiting for sshd to be ready"
|
||||||
|
raise SshdError(msg)
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|||||||
Reference in New Issue
Block a user