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:
Mic92
2025-03-22 16:16:27 +00:00
4 changed files with 14 additions and 10 deletions

View File

@@ -180,7 +180,7 @@
self.packages.${pkgs.system}.clan-cli
] ++ self.packages.${pkgs.system}.clan-cli.runtimeDependencies;
environment.etc."install-closure".source = "${closureInfo}/store-paths";
virtualisation.memorySize = 2048;
virtualisation.memorySize = 3048;
nix.package = nixPackage;
nix.settings = {
substituters = lib.mkForce [ ];

View File

@@ -167,7 +167,7 @@
self.packages.${pkgs.system}.clan-cli
] ++ self.packages.${pkgs.system}.clan-cli.runtimeDependencies;
environment.etc."install-closure".source = "${closureInfo}/store-paths";
virtualisation.memorySize = 2048;
virtualisation.memorySize = 3048;
nix.package = nixPackage;
nix.settings = {
substituters = lib.mkForce [ ];

View File

@@ -96,12 +96,6 @@ let
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
# generators on the machine that runs `clan vars generate`. If a
# users is using the `pkgsForSystem`, we don't set

View File

@@ -10,13 +10,16 @@ from tempfile import TemporaryDirectory
from typing import TYPE_CHECKING
import pytest
from fixture_error import FixtureError
if TYPE_CHECKING:
from command import Command
from ports import PortFunction
class SshdError(Exception):
pass
class Sshd:
def __init__(self, port: int, proc: subprocess.Popen[str], key: str) -> None:
self.port = port
@@ -135,6 +138,10 @@ def sshd(
extra_env=env,
)
monkeypatch.delenv("SSH_AUTH_SOCK", raising=False)
timeout = 5
start_time = time.time()
while True:
print(sshd_config.path)
if (
@@ -162,5 +169,8 @@ def sshd(
rc = proc.poll()
if rc is not None:
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)