!jtzdZrQSXtEpeGtzAn:nixos.org

Testing with Nix

105 Members
27 Servers

Load older messages


SenderMessageTime
22 Dec 2024
@labataxe:matrix.orglabataxe joined the room.23:06:04
27 Dec 2024
@raitobezarius:matrix.orgraitobezarius changed their display name from raitobezarius to raitobezarius (DECT: 3538 / EPVPN 2681).07:31:26
@dimitarnestorov:matrix.orgDimitar set a profile picture.11:41:19
@dimitarnestorov:matrix.orgDimitar changed their display name from dimitarnestorov to Dimitar.11:42:04
30 Dec 2024
@trudwin:matrix.orgtrudwin joined the room.10:11:59
@raitobezarius:matrix.orgraitobezarius changed their display name from raitobezarius (DECT: 3538 / EPVPN 2681) to raitobezarius.16:26:58
1 Jan 2025
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.14:26:28
6 Jan 2025
@frederic:scs.ems.hostFrédéric Christ (back on 02.01.) changed their display name from Frédéric Christ 🎄23.12. - 07.01. to Frédéric Christ.12:31:44
11 Jan 2025
@orzklv:matrix.org@orzklv:matrix.org left the room.04:07:44
12 Jan 2025
@strutztm:strutztm.de@strutztm:strutztm.de joined the room.00:23:11
22 Jan 2025
@frederic:scs.ems.hostFrédéric Christ (back on 02.01.) Hi, regarding the NixOS Testing Driver in interactive mode: Is there any way to exit a shell after entering with <machine>.shell_interact() without stopping the whole setup with CTRL+D? 09:36:22
23 Jan 2025
@tfc:matrix.orgtfcthe shell_interact thingy is quite a shaky thing.14:55:01
@tfc:matrix.orgtfc are you aware that you can easily set SSH port forwards via the interactive.nodes.... settings that are only enabled in interactive mode? 14:55:34
@frederic:scs.ems.hostFrédéric Christ (back on 02.01.) Hi tfc ! I am. If I can, I use this. However, sometimes I'm debugging existing tests in nixpkgs with a custom networking setup. In this case, the SSH port forwarding doesn't work and I'm left with the QEMU framebuffers or shell_interact(). 16:52:23
30 Jan 2025
@lunarix:matrix.orgLunarix joined the room.14:35:57
@lunarix:matrix.orgLunarix

Hello, I hope you're all doing well, and that its okay that I ask a question regarding nixos.

https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/lib/testing/driver.nix#L18

vms = map (m: m.system.build.vm) (lib.attrValues config.nodes);

https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/modules/virtualisation/build-vm.nix

system.build.vm = lib.mkDefault config.virtualisation.vmVariant.system.build.vm;

https://github.com/NixOS/nixpkgs/blob/nixos-24.11/nixos/modules/virtualisation/qemu-vm.nix#L1332-L1342

system.build.vm = hostPkgs.runCommand "nixos-vm" ...

can anyone help me understand why when i use runTest/evalTest, and it uses system.build.vm, without applying the extendModules [in build-vm.nix], but when i use nixpkgs.lib.nixosSystem, it does apply extendModules [in build-vm.nix]

testers.runNixOSTest {
    name = "boot-${k}";
    node.pkgsReadOnly = false;
    nodes.machine.imports = v.modules ++ [
      { virtualisation.vmVariant.services.openssh.enable = lib.mkForce true; }
    ];
    node.specialArgs = prelude.mkSpecialArgs v;
    testScript =
      ''
        machine.start()
        machine.wait_for_unit("default.target")
        machine.wait_for_unit("sshd.service")
      '';
  })

My objective goal, (which may be silly, i'm happy for input aswell),
is that this should include openssh as part of the test env but not the production env.

Thank you for your time.

14:36:37
2 Feb 2025
@pederbs:pvv.ntnu.nopbsds changed their display name from pbsds to pbsds (FOSDEM).16:04:32
3 Feb 2025
@pederbs:pvv.ntnu.nopbsds changed their display name from pbsds (FOSDEM) to pbsds.16:25:03
6 Feb 2025
@tfc:matrix.orgtfc

Lunarix: sry don't see notifications in chat rooms as this would render the app unusable with all the chat rooms. ping me directly next time plz and i will be happy to help.

please let me reiterate on what you want: you want SSH only in test environments, does that mean in the interactive mode of the test driver, but not in the sandboxed tests? or do you want no ssh in tests at all?

09:12:21
7 Feb 2025
@roberthensing:matrix.orgRobert Hensing (roberth) Lunarix: vmVariant only applies to nixos-rebuild build-vm commands. You could omit virtualisation.vmVariant., or if you want to avoid repeating things between your build-vm config and your test config, you could do something like { virtualisation.vmVariant = { imports = [ ./my-vm-stuff.nix; ] }; } in your NixOS config and v.modules ++ [ ./my-vm-stuff.nix ] in the test. 13:20:04
@terrorjack:matrix.terrorjack.com@terrorjack:matrix.terrorjack.com left the room.22:28:05
8 Feb 2025
@terrorjack:matrix.orgterrorjack joined the room.01:56:41
@terrorjack:matrix.orgterrorjack set a profile picture.02:24:24
@terrorjack:matrix.orgterrorjack removed their profile picture.02:25:00
15 Feb 2025
@benjb83:matrix.orgBenjB83 joined the room.10:15:30
@benjb83:matrix.orgBenjB83 changed their display name from Benjamín Buske to BenjB83.10:43:32
16 Feb 2025
@kristijan.zic:matrix.orgKristijanZic joined the room.01:03:36
27 Feb 2025
@wjjunyor:matrix.orgw changed their display name from w to w - out for 🚬.18:34:26
@wjjunyor:matrix.orgw changed their display name from w - out for 🚬 to w.19:25:47
12 Mar 2025
@vidariondr:matrix.orgvidariondr joined the room.21:07:41

Show newer messages


Back to Room ListRoom Version: 9