Merge master into staging-next

This commit is contained in:
github-actions[bot] 2022-03-31 18:01:13 +00:00 committed by GitHub
commit be4f006d3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
293 changed files with 660 additions and 591 deletions

View File

@ -5,15 +5,9 @@ A NixOS test is a Nix expression that has the following structure:
```nix ```nix
import ./make-test-python.nix { import ./make-test-python.nix {
# Either the configuration of a single machine: # One or more machines:
machine =
{ config, pkgs, ... }:
{ configuration…
};
# Or a set of machines:
nodes = nodes =
{ machine1 = { machine =
{ config, pkgs, ... }: { … }; { config, pkgs, ... }: { … };
machine2 = machine2 =
{ config, pkgs, ... }: { … }; { config, pkgs, ... }: { … };
@ -29,17 +23,16 @@ import ./make-test-python.nix {
The attribute `testScript` is a bit of Python code that executes the The attribute `testScript` is a bit of Python code that executes the
test (described below). During the test, it will start one or more test (described below). During the test, it will start one or more
virtual machines, the configuration of which is described by the virtual machines, the configuration of which is described by
attribute `machine` (if you need only one machine in your test) or by the attribute `nodes`.
the attribute `nodes` (if you need multiple machines). For instance,
[`login.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix) An example of a single-node test is
only needs a single machine to test whether users can log in [`login.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix).
It only needs a single machine to test whether users can log in
on the virtual console, whether device ownership is correctly maintained on the virtual console, whether device ownership is correctly maintained
when switching between consoles, and so on. On the other hand, when switching between consoles, and so on. An interesting multi-node test is
[`nfs/simple.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/nfs/simple.nix), [`nfs/simple.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/nfs/simple.nix).
which tests NFS client and server functionality in the It uses two client nodes to test correct locking across server crashes.
Linux kernel (including whether locks are maintained across server
crashes), requires three machines: a server and two clients.
There are a few special NixOS configuration options for test VMs: There are a few special NixOS configuration options for test VMs:
@ -67,8 +60,7 @@ The test script is a sequence of Python statements that perform various
actions, such as starting VMs, executing commands in the VMs, and so on. actions, such as starting VMs, executing commands in the VMs, and so on.
Each virtual machine is represented as an object stored in the variable Each virtual machine is represented as an object stored in the variable
`name` if this is also the identifier of the machine in the declarative `name` if this is also the identifier of the machine in the declarative
config. If you didn\'t specify multiple machines using the `nodes` config. If you specified a node `nodes.machine`, the following example starts the
attribute, it is just `machine`. The following example starts the
machine, waits until it has finished booting, then executes a command machine, waits until it has finished booting, then executes a command
and checks that the output is more-or-less correct: and checks that the output is more-or-less correct:
@ -79,7 +71,7 @@ if not "Linux" in machine.succeed("uname"):
raise Exception("Wrong OS") raise Exception("Wrong OS")
``` ```
The first line is actually unnecessary; machines are implicitly started The first line is technically unnecessary; machines are implicitly started
when you first execute an action on them (such as `wait_for_unit` or when you first execute an action on them (such as `wait_for_unit` or
`succeed`). If you have multiple machines, you can speed up the test by `succeed`). If you have multiple machines, you can speed up the test by
starting them in parallel: starting them in parallel:
@ -303,7 +295,7 @@ For faster dev cycles it\'s also possible to disable the code-linters
```nix ```nix
import ./make-test-python.nix { import ./make-test-python.nix {
skipLint = true; skipLint = true;
machine = nodes.machine =
{ config, pkgs, ... }: { config, pkgs, ... }:
{ configuration… { configuration…
}; };

View File

@ -6,15 +6,9 @@
<programlisting language="bash"> <programlisting language="bash">
import ./make-test-python.nix { import ./make-test-python.nix {
# Either the configuration of a single machine: # One or more machines:
machine =
{ config, pkgs, ... }:
{ configuration…
};
# Or a set of machines:
nodes = nodes =
{ machine1 = { machine =
{ config, pkgs, ... }: { … }; { config, pkgs, ... }: { … };
machine2 = machine2 =
{ config, pkgs, ... }: { … }; { config, pkgs, ... }: { … };
@ -31,18 +25,18 @@ import ./make-test-python.nix {
The attribute <literal>testScript</literal> is a bit of Python code The attribute <literal>testScript</literal> is a bit of Python code
that executes the test (described below). During the test, it will that executes the test (described below). During the test, it will
start one or more virtual machines, the configuration of which is start one or more virtual machines, the configuration of which is
described by the attribute <literal>machine</literal> (if you need described by the attribute <literal>nodes</literal>.
only one machine in your test) or by the attribute </para>
<literal>nodes</literal> (if you need multiple machines). For <para>
instance, An example of a single-node test is
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix"><literal>login.nix</literal></link> <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix"><literal>login.nix</literal></link>.
only needs a single machine to test whether users can log in on the It only needs a single machine to test whether users can log in on
virtual console, whether device ownership is correctly maintained the virtual console, whether device ownership is correctly
when switching between consoles, and so on. On the other hand, maintained when switching between consoles, and so on. An
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/nfs/simple.nix"><literal>nfs/simple.nix</literal></link>, interesting multi-node test is
which tests NFS client and server functionality in the Linux kernel <link xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/nfs/simple.nix"><literal>nfs/simple.nix</literal></link>.
(including whether locks are maintained across server crashes), It uses two client nodes to test correct locking across server
requires three machines: a server and two clients. crashes.
</para> </para>
<para> <para>
There are a few special NixOS configuration options for test VMs: There are a few special NixOS configuration options for test VMs:
@ -94,9 +88,8 @@ import ./make-test-python.nix {
various actions, such as starting VMs, executing commands in the various actions, such as starting VMs, executing commands in the
VMs, and so on. Each virtual machine is represented as an object VMs, and so on. Each virtual machine is represented as an object
stored in the variable <literal>name</literal> if this is also the stored in the variable <literal>name</literal> if this is also the
identifier of the machine in the declarative config. If you didn't identifier of the machine in the declarative config. If you
specify multiple machines using the <literal>nodes</literal> specified a node <literal>nodes.machine</literal>, the following
attribute, it is just <literal>machine</literal>. The following
example starts the machine, waits until it has finished booting, example starts the machine, waits until it has finished booting,
then executes a command and checks that the output is more-or-less then executes a command and checks that the output is more-or-less
correct: correct:
@ -108,7 +101,7 @@ if not &quot;Linux&quot; in machine.succeed(&quot;uname&quot;):
raise Exception(&quot;Wrong OS&quot;) raise Exception(&quot;Wrong OS&quot;)
</programlisting> </programlisting>
<para> <para>
The first line is actually unnecessary; machines are implicitly The first line is technically unnecessary; machines are implicitly
started when you first execute an action on them (such as started when you first execute an action on them (such as
<literal>wait_for_unit</literal> or <literal>succeed</literal>). If <literal>wait_for_unit</literal> or <literal>succeed</literal>). If
you have multiple machines, you can speed up the test by starting you have multiple machines, you can speed up the test by starting
@ -554,7 +547,7 @@ machine.wait_for_unit(&quot;xautolock.service&quot;, &quot;x-session-user&quot;)
<programlisting language="bash"> <programlisting language="bash">
import ./make-test-python.nix { import ./make-test-python.nix {
skipLint = true; skipLint = true;
machine = nodes.machine =
{ config, pkgs, ... }: { config, pkgs, ... }:
{ configuration… { configuration…
}; };

View File

@ -206,6 +206,7 @@ rec {
)]; )];
}; };
in in
lib.warnIf (t?machine) "In test `${name}': The `machine' attribute in NixOS tests (pkgs.nixosTest / make-test-pyton.nix / testing-python.nix / makeTest) is deprecated. Please use the equivalent `nodes.machine'."
build-vms.buildVirtualNetwork ( build-vms.buildVirtualNetwork (
nodes // lib.optionalAttrs (machine != null) { inherit machine; } nodes // lib.optionalAttrs (machine != null) { inherit machine; }
); );

View File

@ -3,67 +3,66 @@
with lib; with lib;
let let
cfg = config.programs._1password-gui; cfg = config.programs._1password-gui;
in { in
{
options = { options = {
programs._1password-gui = { programs._1password-gui = {
enable = mkEnableOption "The 1Password Desktop application with browser integration"; enable = mkEnableOption "the 1Password GUI application";
groupId = mkOption { gid = mkOption {
type = types.int; type = types.addCheck types.int (x: x >= 1000);
example = literalExpression "5000"; example = literalExpression "5000";
description = '' description = ''
The GroupID to assign to the onepassword group, which is needed for browser integration. The group ID must be 1000 or greater. The gid to assign to the onepassword group, which is needed for browser integration.
''; It must be 1000 or greater.
'';
}; };
polkitPolicyOwners = mkOption { polkitPolicyOwners = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = []; default = [ ];
example = literalExpression "[\"user1\" \"user2\" \"user3\"]"; example = literalExpression ''["user1" "user2" "user3"]'';
description = '' description = ''
A list of users who should be able to integrate 1Password with polkit-based authentication mechanisms. By default, no users will have such access. A list of users who should be able to integrate 1Password with polkit-based authentication mechanisms.
''; '';
}; };
package = mkOption { package = mkPackageOption pkgs "1Password GUI" {
type = types.package; default = [ "_1password-gui" ];
default = pkgs._1password-gui;
defaultText = literalExpression "pkgs._1password-gui";
example = literalExpression "pkgs._1password-gui";
description = ''
The 1Password derivation to use. This can be used to upgrade from the stable release that we keep in nixpkgs to the betas.
'';
}; };
}; };
}; };
config = let config =
package = cfg.package.override { let
polkitPolicyOwners = cfg.polkitPolicyOwners; package = cfg.package.override {
}; polkitPolicyOwners = cfg.polkitPolicyOwners;
in mkIf cfg.enable { };
environment.systemPackages = [ package ]; in
users.groups.onepassword.gid = cfg.groupId; mkIf cfg.enable {
environment.systemPackages = [ package ];
users.groups.onepassword.gid = cfg.gid;
security.wrappers = { security.wrappers = {
"1Password-BrowserSupport" = "1Password-BrowserSupport" = {
{ source = "${cfg.package}/share/1password/1Password-BrowserSupport"; source = "${package}/share/1password/1Password-BrowserSupport";
owner = "root"; owner = "root";
group = "onepassword"; group = "onepassword";
setuid = false; setuid = false;
setgid = true; setgid = true;
}; };
"1Password-KeyringHelper" = "1Password-KeyringHelper" = {
{ source = "${cfg.package}/share/1password/1Password-KeyringHelper"; source = "${package}/share/1password/1Password-KeyringHelper";
owner = "root"; owner = "root";
group = "onepassword"; group = "onepassword";
setuid = true; setuid = true;
setgid = true; setgid = true;
}; };
}; };
}; };
} }

View File

@ -3,35 +3,33 @@
with lib; with lib;
let let
cfg = config.programs._1password; cfg = config.programs._1password;
in {
in
{
options = { options = {
programs._1password = { programs._1password = {
enable = mkEnableOption "The 1Password CLI tool with biometric unlock and integration with the 1Password GUI."; enable = mkEnableOption "the 1Password CLI tool";
groupId = mkOption { gid = mkOption {
type = types.int; type = types.addCheck types.int (x: x >= 1000);
example = literalExpression "5001"; example = literalExpression "5001";
description = '' description = ''
The GroupID to assign to the onepassword-cli group, which is needed for integration with the 1Password GUI. The group ID must be 1000 or greater. The gid to assign to the onepassword-cli group, which is needed for integration with the 1Password GUI.
It must be 1000 or greater.
''; '';
}; };
package = mkOption { package = mkPackageOption pkgs "1Password CLI" {
type = types.package; default = [ "_1password" ];
default = pkgs._1password;
defaultText = literalExpression "pkgs._1password";
example = literalExpression "pkgs._1password";
description = ''
The 1Password CLI derivation to use.
'';
}; };
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ]; environment.systemPackages = [ cfg.package ];
users.groups.onepassword-cli.gid = cfg.groupId; users.groups.onepassword-cli.gid = cfg.gid;
security.wrappers = { security.wrappers = {
"op" = { "op" = {

View File

@ -38,7 +38,7 @@ in
environment.etc."wireplumber/main.lua.d/80-nixos.lua" = lib.mkIf (!pwUsedForAudio) { environment.etc."wireplumber/main.lua.d/80-nixos.lua" = lib.mkIf (!pwUsedForAudio) {
text = '' text = ''
# Pipewire is not used for audio, so prevent it from grabbing audio devices -- Pipewire is not used for audio, so prevent it from grabbing audio devices
alsa_monitor.enable = function() end alsa_monitor.enable = function() end
''; '';
}; };

View File

@ -141,7 +141,7 @@ in {
enable = mkEnableOption "matrix.org synapse"; enable = mkEnableOption "matrix.org synapse";
configFile = mkOption { configFile = mkOption {
type = types.str; type = types.path;
readOnly = true; readOnly = true;
description = '' description = ''
Path to the configuration file on the target system. Useful to configure e.g. workers Path to the configuration file on the target system. Useful to configure e.g. workers

View File

@ -39,7 +39,7 @@ in
type = types.str; type = types.str;
example = "45min"; example = "45min";
description = '' description = ''
Add a randomized delay before each automatic upgrade. Add a randomized delay before each garbage collection.
The delay will be chosen between zero and this value. The delay will be chosen between zero and this value.
This value must be a time span in the format specified by This value must be a time span in the format specified by
<citerefentry><refentrytitle>systemd.time</refentrytitle> <citerefentry><refentrytitle>systemd.time</refentrytitle>

View File

@ -216,6 +216,8 @@ in
Restart = "on-failure"; Restart = "on-failure";
# The `mbind` syscall is needed for running the classifier. # The `mbind` syscall is needed for running the classifier.
SystemCallFilter = defaultServiceConfig.SystemCallFilter ++ [ "mbind" ]; SystemCallFilter = defaultServiceConfig.SystemCallFilter ++ [ "mbind" ];
# Needs to talk to mail server for automated import rules
PrivateNetwork = false;
}; };
environment = env; environment = env;
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
@ -258,8 +260,6 @@ in
'${cfg.passwordFile}' '${cfg.dataDir}/superuser-password' '${cfg.passwordFile}' '${cfg.dataDir}/superuser-password'
''; '';
Type = "oneshot"; Type = "oneshot";
# Needs to talk to mail server for automated import rules
PrivateNetwork = false;
}; };
}; };

View File

@ -241,7 +241,7 @@ in
"xhci_pci" "xhci_pci"
"usbhid" "usbhid"
"hid_generic" "hid_lenovo" "hid_apple" "hid_roccat" "hid_generic" "hid_lenovo" "hid_apple" "hid_roccat"
"hid_logitech_hidpp" "hid_logitech_dj" "hid_microsoft" "hid_logitech_hidpp" "hid_logitech_dj" "hid_microsoft" "hid_cherry"
] ++ optionals pkgs.stdenv.hostPlatform.isx86 [ ] ++ optionals pkgs.stdenv.hostPlatform.isx86 [
# Misc. x86 keyboard stuff. # Misc. x86 keyboard stuff.

View File

@ -90,7 +90,7 @@ in {
example = "45min"; example = "45min";
description = '' description = ''
Add a randomized delay before each automatic upgrade. Add a randomized delay before each automatic upgrade.
The delay will be chozen between zero and this value. The delay will be chosen between zero and this value.
This value must be a time span in the format specified by This value must be a time span in the format specified by
<citerefentry><refentrytitle>systemd.time</refentrytitle> <citerefentry><refentrytitle>systemd.time</refentrytitle>
<manvolnum>7</manvolnum></citerefentry> <manvolnum>7</manvolnum></citerefentry>

View File

@ -961,7 +961,10 @@ in
services.qemuGuest.enable = cfg.qemu.guestAgent.enable; services.qemuGuest.enable = cfg.qemu.guestAgent.enable;
system.build.vm = pkgs.runCommand "nixos-vm" { preferLocalBuild = true; } system.build.vm = pkgs.runCommand "nixos-vm" {
preferLocalBuild = true;
meta.mainProgram = "run-${config.system.name}-vm";
}
'' ''
mkdir -p $out/bin mkdir -p $out/bin
ln -s ${config.system.build.toplevel} $out/system ln -s ${config.system.build.toplevel} $out/system

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
maintainers = with lib.maintainers; [ veehaitch ]; maintainers = with lib.maintainers; [ veehaitch ];
}; };
machine = { lib, ... }: { nodes.machine = { lib, ... }: {
services.aesmd = { services.aesmd = {
enable = true; enable = true;
settings = { settings = {

View File

@ -15,7 +15,7 @@ in
maintainers = [ alexarice turion ]; maintainers = [ alexarice turion ];
}; };
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
environment.systemPackages = [ environment.systemPackages = [
(pkgs.agda.withPackages { (pkgs.agda.withPackages {
pkgs = p: [ p.standard-library ]; pkgs = p: [ p.standard-library ];

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
maintainers = [ sumnerevans ]; maintainers = [ sumnerevans ];
}; };
machine = nodes.machine =
{ pkgs, ... }: { pkgs, ... }:
{ {
services.airsonic = { services.airsonic = {

View File

@ -18,7 +18,7 @@ makeTest {
meta = with maintainers; { meta = with maintainers; {
maintainers = [ urbas ]; maintainers = [ urbas ];
}; };
machine = { ... }: nodes.machine = { ... }:
{ {
imports = [ ../modules/profiles/headless.nix ../modules/virtualisation/amazon-init.nix ]; imports = [ ../modules/profiles/headless.nix ../modules/virtualisation/amazon-init.nix ];
services.openssh.enable = true; services.openssh.enable = true;

View File

@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
name = "apfs"; name = "apfs";
meta.maintainers = with pkgs.lib.maintainers; [ Luflosi ]; meta.maintainers = with pkgs.lib.maintainers; [ Luflosi ];
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
virtualisation.emptyDiskImages = [ 1024 ]; virtualisation.emptyDiskImages = [ 1024 ];
boot.supportedFilesystems = [ "apfs" ]; boot.supportedFilesystems = [ "apfs" ];

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... } : {
maintainers = [ julm ]; maintainers = [ julm ];
}; };
machine = nodes.machine =
{ lib, pkgs, config, ... }: { lib, pkgs, config, ... }:
with lib; with lib;
{ {

View File

@ -6,7 +6,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
maintainers = [ bjornfor ]; maintainers = [ bjornfor ];
}; };
machine = nodes.machine =
{ ... }: { ... }:
{ services.atd.enable = true; { services.atd.enable = true;
users.users.alice = { isNormalUser = true; }; users.users.alice = { isNormalUser = true; };

View File

@ -107,7 +107,7 @@ in
{ {
justThePackage = makeTest { justThePackage = makeTest {
name = "atop-justThePackage"; name = "atop-justThePackage";
machine = { nodes.machine = {
environment.systemPackages = [ pkgs.atop ]; environment.systemPackages = [ pkgs.atop ];
}; };
testScript = with assertions; builtins.concatStringsSep "\n" [ testScript = with assertions; builtins.concatStringsSep "\n" [
@ -123,7 +123,7 @@ in
}; };
defaults = makeTest { defaults = makeTest {
name = "atop-defaults"; name = "atop-defaults";
machine = { nodes.machine = {
programs.atop = { programs.atop = {
enable = true; enable = true;
}; };
@ -141,7 +141,7 @@ in
}; };
minimal = makeTest { minimal = makeTest {
name = "atop-minimal"; name = "atop-minimal";
machine = { nodes.machine = {
programs.atop = { programs.atop = {
enable = true; enable = true;
atopService.enable = false; atopService.enable = false;
@ -162,7 +162,7 @@ in
}; };
netatop = makeTest { netatop = makeTest {
name = "atop-netatop"; name = "atop-netatop";
machine = { nodes.machine = {
programs.atop = { programs.atop = {
enable = true; enable = true;
netatop.enable = true; netatop.enable = true;
@ -181,7 +181,7 @@ in
}; };
atopgpu = makeTest { atopgpu = makeTest {
name = "atop-atopgpu"; name = "atop-atopgpu";
machine = { nodes.machine = {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (getName pkg) [ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (getName pkg) [
"cudatoolkit" "cudatoolkit"
]; ];
@ -204,7 +204,7 @@ in
}; };
everything = makeTest { everything = makeTest {
name = "atop-everthing"; name = "atop-everthing";
machine = { nodes.machine = {
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (getName pkg) [ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (getName pkg) [
"cudatoolkit" "cudatoolkit"
]; ];

View File

@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
name = "bcachefs"; name = "bcachefs";
meta.maintainers = with pkgs.lib.maintainers; [ chiiruno ]; meta.maintainers = with pkgs.lib.maintainers; [ chiiruno ];
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
virtualisation.emptyDiskImages = [ 4096 ]; virtualisation.emptyDiskImages = [ 4096 ];
networking.hostId = "deadbeef"; networking.hostId = "deadbeef";
boot.supportedFilesystems = [ "bcachefs" ]; boot.supportedFilesystems = [ "bcachefs" ];

View File

@ -28,7 +28,7 @@ in
name = "beanstalkd"; name = "beanstalkd";
meta.maintainers = [ lib.maintainers.aanderse ]; meta.maintainers = [ lib.maintainers.aanderse ];
machine = nodes.machine =
{ ... }: { ... }:
{ services.beanstalkd.enable = true; { services.beanstalkd.enable = true;
}; };

View File

@ -2,7 +2,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }:
{ {
name = "bees"; name = "bees";
machine = { config, pkgs, ... }: { nodes.machine = { config, pkgs, ... }: {
boot.initrd.postDeviceCommands = '' boot.initrd.postDeviceCommands = ''
${pkgs.btrfs-progs}/bin/mkfs.btrfs -f -L aux1 /dev/vdb ${pkgs.btrfs-progs}/bin/mkfs.btrfs -f -L aux1 /dev/vdb
${pkgs.btrfs-progs}/bin/mkfs.btrfs -f -L aux2 /dev/vdc ${pkgs.btrfs-progs}/bin/mkfs.btrfs -f -L aux2 /dev/vdc

View File

@ -1,7 +1,7 @@
import ./make-test-python.nix { import ./make-test-python.nix {
name = "bind"; name = "bind";
machine = { pkgs, lib, ... }: { nodes.machine = { pkgs, lib, ... }: {
services.bind.enable = true; services.bind.enable = true;
services.bind.extraOptions = "empty-zones-enable no;"; services.bind.extraOptions = "empty-zones-enable no;";
services.bind.zones = lib.singleton { services.bind.zones = lib.singleton {

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
maintainers = with maintainers; [ _1000101 ]; maintainers = with maintainers; [ _1000101 ];
}; };
machine = { ... }: { nodes.machine = { ... }: {
services.bitcoind."mainnet" = { services.bitcoind."mainnet" = {
enable = true; enable = true;
rpc = { rpc = {

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
maintainers = with maintainers; [ _1000101 ]; maintainers = with maintainers; [ _1000101 ];
}; };
machine = { ... }: { nodes.machine = { ... }: {
services.blockbook-frontend."test" = { services.blockbook-frontend."test" = {
enable = true; enable = true;
}; };

View File

@ -1,7 +1,7 @@
import ./make-test-python.nix ({ pkgs, ... }: { import ./make-test-python.nix ({ pkgs, ... }: {
name = "boot-stage1"; name = "boot-stage1";
machine = { config, pkgs, lib, ... }: { nodes.machine = { config, pkgs, lib, ... }: {
boot.extraModulePackages = let boot.extraModulePackages = let
compileKernelModule = name: source: pkgs.runCommandCC name rec { compileKernelModule = name: source: pkgs.runCommandCC name rec {
inherit source; inherit source;

View File

@ -42,7 +42,7 @@ let
nodes = { }; nodes = { };
testScript = testScript =
'' ''
machine = create_machine(${machineConfig}) nodes.machine = create_machine(${machineConfig})
machine.start() machine.start()
machine.wait_for_unit("multi-user.target") machine.wait_for_unit("multi-user.target")
machine.succeed("nix store verify --no-trust -r --option experimental-features nix-command /run/current-system") machine.succeed("nix store verify --no-trust -r --option experimental-features nix-command /run/current-system")
@ -83,7 +83,7 @@ let
name = "boot-netboot-" + name; name = "boot-netboot-" + name;
nodes = { }; nodes = { };
testScript = '' testScript = ''
machine = create_machine(${machineConfig}) nodes.machine = create_machine(${machineConfig})
machine.start() machine.start()
machine.wait_for_unit("multi-user.target") machine.wait_for_unit("multi-user.target")
machine.shutdown() machine.shutdown()
@ -138,7 +138,7 @@ in {
if os.system("qemu-img create -f qcow2 -F raw -b ${sdImage} ${mutableImage}") != 0: if os.system("qemu-img create -f qcow2 -F raw -b ${sdImage} ${mutableImage}") != 0:
raise RuntimeError("Could not create mutable linked image") raise RuntimeError("Could not create mutable linked image")
machine = create_machine(${machineConfig}) nodes.machine = create_machine(${machineConfig})
machine.start() machine.start()
machine.wait_for_unit("multi-user.target") machine.wait_for_unit("multi-user.target")
machine.succeed("nix store verify -r --no-trust --option experimental-features nix-command /run/current-system") machine.succeed("nix store verify -r --no-trust --option experimental-features nix-command /run/current-system")

View File

@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
name = "bpf"; name = "bpf";
meta.maintainers = with pkgs.lib.maintainers; [ martinetd ]; meta.maintainers = with pkgs.lib.maintainers; [ martinetd ];
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
programs.bcc.enable = true; programs.bcc.enable = true;
environment.systemPackages = with pkgs; [ bpftrace ]; environment.systemPackages = with pkgs; [ bpftrace ];
}; };

View File

@ -2,7 +2,7 @@ import ./make-test-python.nix ({ lib, ... }: {
name = "breitbandmessung"; name = "breitbandmessung";
meta.maintainers = with lib.maintainers; [ b4dm4n ]; meta.maintainers = with lib.maintainers; [ b4dm4n ];
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
imports = [ imports = [
./common/user-account.nix ./common/user-account.nix
./common/x11.nix ./common/x11.nix

View File

@ -7,7 +7,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
maintainers = [ mattchrist ]; maintainers = [ mattchrist ];
}; };
machine = { pkgs, ... }: nodes.machine = { pkgs, ... }:
{ {
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
hardware.sane = { hardware.sane = {

View File

@ -6,7 +6,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
maintainers = [ flokli ]; maintainers = [ flokli ];
}; };
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
services.buildkite-agents = { services.buildkite-agents = {
one = { one = {
privateSshKeyPath = (import ./ssh-keys.nix pkgs).snakeOilPrivateKey; privateSshKeyPath = (import ./ssh-keys.nix pkgs).snakeOilPrivateKey;

View File

@ -6,7 +6,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
maintainers = [ matthewbauer ]; maintainers = [ matthewbauer ];
}; };
machine = { ... }: nodes.machine = { ... }:
{ {
imports = [ ./common/user-account.nix ]; imports = [ ./common/user-account.nix ];

View File

@ -13,7 +13,7 @@ in
maintainers = [ berbiche ]; maintainers = [ berbiche ];
}; };
machine = { config, ... }: nodes.machine = { config, ... }:
let let
alice = config.users.users.alice; alice = config.users.users.alice;
in { in {

View File

@ -1,7 +1,7 @@
import ./make-test-python.nix ({ pkgs, ...} : { import ./make-test-python.nix ({ pkgs, ...} : {
name = "cfssl"; name = "cfssl";
machine = { config, lib, pkgs, ... }: nodes.machine = { config, lib, pkgs, ... }:
{ {
networking.firewall.allowedTCPPorts = [ config.services.cfssl.port ]; networking.firewall.allowedTCPPorts = [ config.services.cfssl.port ];

View File

@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
name = "clickhouse"; name = "clickhouse";
meta.maintainers = with pkgs.lib.maintainers; [ ma27 ]; meta.maintainers = with pkgs.lib.maintainers; [ ma27 ];
machine = { nodes.machine = {
services.clickhouse.enable = true; services.clickhouse.enable = true;
virtualisation.memorySize = 4096; virtualisation.memorySize = 4096;
}; };

View File

@ -61,7 +61,7 @@ in makeTest {
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ lewo ]; maintainers = [ lewo ];
}; };
machine = { ... }: nodes.machine = { ... }:
{ {
virtualisation.qemu.options = [ "-cdrom" "${metadataDrive}/metadata.iso" ]; virtualisation.qemu.options = [ "-cdrom" "${metadataDrive}/metadata.iso" ];
services.cloud-init = { services.cloud-init = {

View File

@ -46,7 +46,7 @@ let
meta = with pkgs.lib.maintainers; { maintainers = [ sorki mic92 ]; }; meta = with pkgs.lib.maintainers; { maintainers = [ sorki mic92 ]; };
machine = { lib, ... }: { nodes.machine = { lib, ... }: {
environment.systemPackages = [ pkgs.cntr ]; environment.systemPackages = [ pkgs.cntr ];
containers.test = { containers.test = {
autoStart = true; autoStart = true;

View File

@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
name = "collectd"; name = "collectd";
meta = { }; meta = { };
machine = nodes.machine =
{ pkgs, ... }: { pkgs, ... }:
{ {

View File

@ -11,7 +11,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ]; maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ];
}; };
machine = nodes.machine =
{ pkgs, ... }: { pkgs, ... }:
{ imports = [ ../modules/installer/cd-dvd/channel.nix ]; { imports = [ ../modules/installer/cd-dvd/channel.nix ];
virtualisation.writableStore = true; virtualisation.writableStore = true;

View File

@ -12,7 +12,7 @@ in {
maintainers = with lib.maintainers; [ adisbladis earvstedt ]; maintainers = with lib.maintainers; [ adisbladis earvstedt ];
}; };
machine = { config, ... }: { nodes.machine = { config, ... }: {
assertions = let assertions = let
helloName = (builtins.head config.containers.test.config.system.extraDependencies).name; helloName = (builtins.head config.containers.test.config.system.extraDependencies).name;
in [ { in [ {

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
maintainers = with lib.maintainers; [ patryk27 ]; maintainers = with lib.maintainers; [ patryk27 ];
}; };
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
virtualisation.writableStore = true; virtualisation.writableStore = true;
containers.webserver = { containers.webserver = {

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
maintainers = with lib.maintainers; [ kampfschlaefer ]; maintainers = with lib.maintainers; [ kampfschlaefer ];
}; };
machine = nodes.machine =
{ pkgs, ... }: { pkgs, ... }:
{ imports = [ ../modules/installer/cd-dvd/channel.nix ]; { imports = [ ../modules/installer/cd-dvd/channel.nix ];
virtualisation.writableStore = true; virtualisation.writableStore = true;

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
maintainers = with lib.maintainers; [ montag451 ]; maintainers = with lib.maintainers; [ montag451 ];
}; };
machine = nodes.machine =
{ lib, ... }: { lib, ... }:
{ {
virtualisation.vlans = []; virtualisation.vlans = [];

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ]; maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ];
}; };
machine = nodes.machine =
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
{ imports = [ ../modules/installer/cd-dvd/channel.nix ]; { imports = [ ../modules/installer/cd-dvd/channel.nix ];

View File

@ -17,7 +17,7 @@ in import ./make-test-python.nix ({ pkgs, lib, ... }: {
maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ]; maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ];
}; };
machine = nodes.machine =
{ pkgs, ... }: { { pkgs, ... }: {
imports = [ ../modules/installer/cd-dvd/channel.nix ]; imports = [ ../modules/installer/cd-dvd/channel.nix ];
virtualisation = { virtualisation = {

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
maintainers = with lib.maintainers; [ patryk27 ]; maintainers = with lib.maintainers; [ patryk27 ];
}; };
machine = { ... }: { nodes.machine = { ... }: {
# We're using the newest kernel, so that we can test containers with long names. # We're using the newest kernel, so that we can test containers with long names.
# Please see https://github.com/NixOS/nixpkgs/issues/38509 for details. # Please see https://github.com/NixOS/nixpkgs/issues/38509 for details.
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.linuxPackages_latest;

View File

@ -5,7 +5,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
meta = with pkgs.lib.maintainers; { maintainers = [ sorki ]; }; meta = with pkgs.lib.maintainers; { maintainers = [ sorki ]; };
machine = { lib, ... }: nodes.machine = { lib, ... }:
let let
makeNested = subConf: { makeNested = subConf: {
containers.nested = { containers.nested = {

View File

@ -11,7 +11,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ianwookim ]; maintainers = with lib.maintainers; [ aristid aszlig eelco kampfschlaefer ianwookim ];
}; };
machine = nodes.machine =
{ pkgs, ... }: { pkgs, ... }:
{ imports = [ ../modules/installer/cd-dvd/channel.nix ]; { imports = [ ../modules/installer/cd-dvd/channel.nix ];
virtualisation.writableStore = true; virtualisation.writableStore = true;

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
maintainers = with lib.maintainers; [ patryk27 ]; maintainers = with lib.maintainers; [ patryk27 ];
}; };
machine = nodes.machine =
{ pkgs, ... }: { pkgs, ... }:
{ imports = [ ../modules/installer/cd-dvd/channel.nix ]; { imports = [ ../modules/installer/cd-dvd/channel.nix ];
virtualisation.writableStore = true; virtualisation.writableStore = true;

View File

@ -76,7 +76,7 @@ in
enableOCR = true; enableOCR = true;
machine = { pkgs, ... }: nodes.machine = { pkgs, ... }:
{ imports = [ ./common/user-account.nix ./common/x11.nix ]; { imports = [ ./common/user-account.nix ./common/x11.nix ];
# chromium-based browsers refuse to run as root # chromium-based browsers refuse to run as root

View File

@ -3,7 +3,7 @@ import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... }:
{ {
name = "disable-installer-tools"; name = "disable-installer-tools";
machine = nodes.machine =
{ pkgs, lib, ... }: { pkgs, lib, ... }:
{ {
system.disableInstallerTools = true; system.disableInstallerTools = true;

View File

@ -5,7 +5,7 @@ import ./make-test-python.nix (
maintainers = with maintainers; [ jojosch ]; maintainers = with maintainers; [ jojosch ];
}; };
machine = { pkgs, lib, ... }: { nodes.machine = { pkgs, lib, ... }: {
services.bind = { services.bind = {
enable = true; enable = true;
extraOptions = "empty-zones-enable no;"; extraOptions = "empty-zones-enable no;";

View File

@ -6,7 +6,7 @@ import ./make-test-python.nix (
maintainers = [ cole-h ]; maintainers = [ cole-h ];
}; };
machine = nodes.machine =
{ ... }: { ... }:
{ {
users.groups = { foobar = {}; barfoo = {}; baz = { gid = 1337; }; }; users.groups = { foobar = {}; barfoo = {}; baz = { gid = 1337; }; };

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
maintainers = [ ma27 ]; maintainers = [ ma27 ];
}; };
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.jq ]; environment.systemPackages = [ pkgs.jq ];
services.documize = { services.documize = {

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
maintainers = [ fgaz ]; maintainers = [ fgaz ];
}; };
machine = { config, pkgs, ... }: { nodes.machine = { config, pkgs, ... }: {
imports = [ imports = [
./common/x11.nix ./common/x11.nix
]; ];

View File

@ -1,7 +1,7 @@
import ./make-test-python.nix { import ./make-test-python.nix {
name = "dovecot"; name = "dovecot";
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
imports = [ common/user-account.nix ]; imports = [ common/user-account.nix ];
services.postfix.enable = true; services.postfix.enable = true;
services.dovecot2 = { services.dovecot2 = {

View File

@ -2,7 +2,7 @@ import ./make-test-python.nix ({ ... }:
{ {
name = "ecryptfs"; name = "ecryptfs";
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
imports = [ ./common/user-account.nix ]; imports = [ ./common/user-account.nix ];
boot.kernelModules = [ "ecryptfs" ]; boot.kernelModules = [ "ecryptfs" ];
security.pam.enableEcryptfs = true; security.pam.enableEcryptfs = true;

View File

@ -6,7 +6,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
enableOCR = true; enableOCR = true;
machine = nodes.machine =
{ ... }: { ... }:
{ imports = [ ./common/x11.nix ]; { imports = [ ./common/x11.nix ];

View File

@ -6,7 +6,7 @@ import ./make-test-python.nix ({ pkgs, ...} :
maintainers = [ romildo ]; maintainers = [ romildo ];
}; };
machine = { ... }: nodes.machine = { ... }:
{ {
imports = [ ./common/user-account.nix ]; imports = [ ./common/user-account.nix ];
services.xserver.enable = true; services.xserver.enable = true;

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
maintainers = [ nequissimus ]; maintainers = [ nequissimus ];
}; };
machine = { pkgs, ... }: nodes.machine = { pkgs, ... }:
{ {
boot.kernelPackages = pkgs.linuxPackages; boot.kernelPackages = pkgs.linuxPackages;
environment.etc.plainFile.text = '' environment.etc.plainFile.text = ''

View File

@ -9,7 +9,7 @@ in {
maintainers = [ felschr ]; maintainers = [ felschr ];
}; };
machine = { pkgs, ... }: nodes.machine = { pkgs, ... }:
{ {
services.etebase-server = { services.etebase-server = {
inherit dataDir; inherit dataDir;

View File

@ -5,7 +5,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
maintainers = [ _3699n ]; maintainers = [ _3699n ];
}; };
machine = { config, pkgs, ... }: { nodes.machine = { config, pkgs, ... }: {
environment.systemPackages = [ pkgs.curl pkgs.etesync-dav ]; environment.systemPackages = [ pkgs.curl pkgs.etesync-dav ];
}; };

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... } : {
maintainers = [ evils ]; maintainers = [ evils ];
}; };
machine = { ... }: { nodes.machine = { ... }: {
imports = [ ../modules/profiles/minimal.nix ]; imports = [ ../modules/profiles/minimal.nix ];
hardware.fancontrol.enable = true; hardware.fancontrol.enable = true;
hardware.fancontrol.config = '' hardware.fancontrol.config = ''

View File

@ -5,7 +5,7 @@ import ../make-test-python.nix (
# copy_from_host works only for store paths # copy_from_host works only for store paths
rec { rec {
name = "fcitx"; name = "fcitx";
machine = nodes.machine =
{ {
pkgs, pkgs,
... ...

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, firefoxPackage, ... }: {
maintainers = [ eelco shlevy ]; maintainers = [ eelco shlevy ];
}; };
machine = nodes.machine =
{ pkgs, ... }: { pkgs, ... }:
{ imports = [ ./common/x11.nix ]; { imports = [ ./common/x11.nix ];

View File

@ -1,7 +1,7 @@
import ./make-test-python.nix ({ pkgs, ... }: { import ./make-test-python.nix ({ pkgs, ... }: {
name = "fish"; name = "fish";
machine = nodes.machine =
{ pkgs, ... }: { pkgs, ... }:
{ {

View File

@ -1,7 +1,7 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: { import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "fluentd"; name = "fluentd";
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
services.fluentd = { services.fluentd = {
enable = true; enable = true;
config = '' config = ''

View File

@ -6,7 +6,7 @@ import ./make-test-python.nix ({ lib, ... }:
jtojnar jtojnar
]; ];
machine = { config, pkgs, ... }: { nodes.machine = { config, pkgs, ... }: {
fonts.enableDefaultFonts = true; # Background fonts fonts.enableDefaultFonts = true; # Background fonts
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
noto-fonts-emoji noto-fonts-emoji

View File

@ -1,7 +1,7 @@
import ./make-test-python.nix { import ./make-test-python.nix {
name = "fsck"; name = "fsck";
machine = { lib, ... }: { nodes.machine = { lib, ... }: {
virtualisation.emptyDiskImages = [ 1 ]; virtualisation.emptyDiskImages = [ 1 ];
virtualisation.fileSystems = { virtualisation.fileSystems = {

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
maintainers = [ fgaz ]; maintainers = [ fgaz ];
}; };
machine = { config, pkgs, ... }: { nodes.machine = { config, pkgs, ... }: {
imports = [ imports = [
./common/x11.nix ./common/x11.nix
]; ];

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
maintainers = with maintainers; [bachp ]; maintainers = with maintainers; [bachp ];
}; };
machine = { ... }: { nodes.machine = { ... }: {
services.geth."mainnet" = { services.geth."mainnet" = {
enable = true; enable = true;
http = { http = {

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
maintainers = teams.gnome.members; maintainers = teams.gnome.members;
}; };
machine = { nodes, ... }: let nodes.machine = { nodes, ... }: let
user = nodes.machine.config.users.users.alice; user = nodes.machine.config.users.users.alice;
in in

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
maintainers = teams.gnome.members; maintainers = teams.gnome.members;
}; };
machine = nodes.machine =
{ ... }: { ... }:
{ imports = [ ./common/user-account.nix ]; { imports = [ ./common/user-account.nix ];

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
maintainers = [ ma27 ]; maintainers = [ ma27 ];
}; };
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.jq ]; environment.systemPackages = [ pkgs.jq ];
services.gotify = { services.gotify = {

View File

@ -2,7 +2,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "graylog"; name = "graylog";
meta.maintainers = with lib.maintainers; [ ]; meta.maintainers = with lib.maintainers; [ ];
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
virtualisation.memorySize = 4096; virtualisation.memorySize = 4096;
virtualisation.diskSize = 4096; virtualisation.diskSize = 4096;

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
maintainers = [ ma27 ]; maintainers = [ ma27 ];
}; };
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
services.grocy = { services.grocy = {
enable = true; enable = true;
hostName = "localhost"; hostName = "localhost";

View File

@ -5,7 +5,7 @@ import ./make-test-python.nix ({ lib, ... }: {
maintainers = [ rnhmjoj ]; maintainers = [ rnhmjoj ];
}; };
machine = { ... }: { nodes.machine = { ... }: {
virtualisation.useBootLoader = true; virtualisation.useBootLoader = true;
boot.loader.timeout = null; boot.loader.timeout = null;

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... } : {
maintainers = [ joachifm ]; maintainers = [ joachifm ];
}; };
machine = nodes.machine =
{ lib, pkgs, config, ... }: { lib, pkgs, config, ... }:
with lib; with lib;
{ users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; }; { users.users.alice = { isNormalUser = true; extraGroups = [ "proc" ]; };

View File

@ -5,7 +5,7 @@ import ./make-test-python.nix ({ lib, ...} : {
maintainers = with lib.maintainers; [ thibautmarty ]; maintainers = with lib.maintainers; [ thibautmarty ];
}; };
machine = { pkgs, lib, ... }: { nodes.machine = { pkgs, lib, ... }: {
imports = [ ./common/x11.nix ./common/user-account.nix ]; imports = [ ./common/x11.nix ./common/user-account.nix ];
test-support.displayManager.auto.user = "alice"; test-support.displayManager.auto.user = "alice";
services.xserver.displayManager.defaultSession = lib.mkForce "none+herbstluftwm"; services.xserver.displayManager.defaultSession = lib.mkForce "none+herbstluftwm";

View File

@ -39,7 +39,7 @@ in makeTest {
nodes = { nodes = {
# System configuration used for installing the installedConfig from above. # System configuration used for installing the installedConfig from above.
machine = { config, lib, pkgs, ... }: with lib; { nodes.machine = { config, lib, pkgs, ... }: with lib; {
imports = [ imports = [
../modules/profiles/installation-device.nix ../modules/profiles/installation-device.nix
../modules/profiles/base.nix ../modules/profiles/base.nix

View File

@ -4,7 +4,7 @@ import ../make-test-python.nix ({ pkgs, ... }:
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ jflanglois ]; maintainers = [ jflanglois ];
}; };
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
environment.systemPackages = [ pkgs.curl ]; environment.systemPackages = [ pkgs.curl ];
services.hitch = { services.hitch = {
enable = true; enable = true;

View File

@ -5,7 +5,7 @@ import ../make-test-python.nix ({ pkgs, ...} : {
broken = true; # tries to download from registry-1.docker.io - how did this ever work? broken = true; # tries to download from registry-1.docker.io - how did this ever work?
}; };
machine = import ./machine.nix; nodes.machine = import ./machine.nix;
testScript = '' testScript = ''
start_all() start_all()

View File

@ -24,7 +24,7 @@ in {
name = "hockeypuck"; name = "hockeypuck";
meta.maintainers = with lib.maintainers; [ etu ]; meta.maintainers = with lib.maintainers; [ etu ];
machine = { ... }: { nodes.machine = { ... }: {
# Used for test # Used for test
environment.systemPackages = [ pkgs.gnupg ]; environment.systemPackages = [ pkgs.gnupg ];

View File

@ -20,7 +20,7 @@ let
maintainers = [ primeos blitz ]; maintainers = [ primeos blitz ];
}; };
machine = { lib, ... }: { nodes.machine = { lib, ... }: {
networking.hostName = hostName; networking.hostName = hostName;
networking.domain = domain; networking.domain = domain;

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... } : {
meta = with pkgs.lib.maintainers; { meta = with pkgs.lib.maintainers; {
maintainers = [ grahamc ]; maintainers = [ grahamc ];
}; };
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
services.hound = { services.hound = {
enable = true; enable = true;
config = '' config = ''

View File

@ -20,7 +20,7 @@ let
maintainers = [ lewo ma27 ]; maintainers = [ lewo ma27 ];
}; };
machine = { pkgs, lib, ... }: { nodes.machine = { pkgs, lib, ... }: {
imports = [ baseConfig ]; imports = [ baseConfig ];
services.hydra = { inherit package; }; services.hydra = { inherit package; };
}; };

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
maintainers = [ aszlig ]; maintainers = [ aszlig ];
}; };
machine = { lib, ... }: { nodes.machine = { lib, ... }: {
imports = [ ./common/x11.nix ./common/user-account.nix ]; imports = [ ./common/x11.nix ./common/user-account.nix ];
test-support.displayManager.auto.user = "alice"; test-support.displayManager.auto.user = "alice";
services.xserver.displayManager.defaultSession = lib.mkForce "none+i3"; services.xserver.displayManager.defaultSession = lib.mkForce "none+i3";

View File

@ -7,7 +7,7 @@ let
inherit (import ../../lib/testing-python.nix { inherit system pkgs; }) makeTest; inherit (import ../../lib/testing-python.nix { inherit system pkgs; }) makeTest;
f = backend: makeTest { f = backend: makeTest {
name = "ihatemoney-${backend}"; name = "ihatemoney-${backend}";
machine = { nodes, lib, ... }: { nodes.machine = { nodes, lib, ... }: {
services.ihatemoney = { services.ihatemoney = {
enable = true; enable = true;
enablePublicProjectCreation = true; enablePublicProjectCreation = true;

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }:
name = "incron"; name = "incron";
meta.maintainers = [ lib.maintainers.aanderse ]; meta.maintainers = [ lib.maintainers.aanderse ];
machine = nodes.machine =
{ ... }: { ... }:
{ services.incron.enable = true; { services.incron.enable = true;
services.incron.extraPackages = [ pkgs.coreutils ]; services.incron.extraPackages = [ pkgs.coreutils ];

View File

@ -3,7 +3,7 @@ import ./make-test-python.nix ({ pkgs, lib, ...} : {
meta.maintainers = [ pkgs.lib.maintainers.eelco ]; meta.maintainers = [ pkgs.lib.maintainers.eelco ];
machine = { ... }: { nodes.machine = { ... }: {
imports = [ ../modules/profiles/minimal.nix ]; imports = [ ../modules/profiles/minimal.nix ];
boot.initrd.network.enable = true; boot.initrd.network.enable = true;
boot.initrd.network.postCommands = boot.initrd.network.postCommands =

View File

@ -11,7 +11,7 @@ let
meta.maintainers = [ lib.maintainers.lheckemann ]; meta.maintainers = [ lib.maintainers.lheckemann ];
machine = { ... }: { nodes.machine = { ... }: {
virtualisation.useBootLoader = true; virtualisation.useBootLoader = true;
boot.initrd.secrets = { boot.initrd.secrets = {
"/test" = secretInStore; "/test" = secretInStore;

View File

@ -6,7 +6,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
maintainers = with pkgs.lib.maintainers; [ LunNova ]; maintainers = with pkgs.lib.maintainers; [ LunNova ];
}; };
machine = { config, ... }: nodes.machine = { config, ... }:
let user = config.users.users.sybil; in let user = config.users.users.sybil; in
{ {
imports = [ imports = [

View File

@ -43,7 +43,7 @@ let
maintainers = tested.meta.maintainers; maintainers = tested.meta.maintainers;
}; };
machine = { ... }: { nodes.machine = { ... }: {
imports = [ imports = [
testConfig testConfig
] ++ optional withX11 ../common/x11.nix; ] ++ optional withX11 ../common/x11.nix;

View File

@ -5,7 +5,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
maintainers = [ sbruder ]; maintainers = [ sbruder ];
}; };
machine = { config, lib, pkgs, ... }: { nodes.machine = { config, lib, pkgs, ... }: {
services.invidious = { services.invidious = {
enable = true; enable = true;
}; };

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
maintainers = [ asbachb ]; maintainers = [ asbachb ];
}; };
machine = { config, pkgs, ... }: { nodes.machine = { config, pkgs, ... }: {
services.isso = { services.isso = {
enable = true; enable = true;
settings = { settings = {

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ lib, pkgs, ... }:
name = "jellyfin"; name = "jellyfin";
meta.maintainers = with lib.maintainers; [ minijackson ]; meta.maintainers = with lib.maintainers; [ minijackson ];
machine = nodes.machine =
{ ... }: { ... }:
{ {
services.jellyfin.enable = true; services.jellyfin.enable = true;

View File

@ -4,7 +4,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
maintainers = teams.jitsi.members; maintainers = teams.jitsi.members;
}; };
machine = { config, pkgs, ... }: { nodes.machine = { config, pkgs, ... }: {
virtualisation.memorySize = 5120; virtualisation.memorySize = 5120;
services.jitsi-meet = { services.jitsi-meet = {

View File

@ -38,7 +38,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
maintainers = [ euank ]; maintainers = [ euank ];
}; };
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
environment.systemPackages = with pkgs; [ k3s gzip ]; environment.systemPackages = with pkgs; [ k3s gzip ];
# k3s uses enough resources the default vm fails. # k3s uses enough resources the default vm fails.

View File

@ -38,7 +38,7 @@ import ./make-test-python.nix ({ pkgs, ... }:
maintainers = [ euank ]; maintainers = [ euank ];
}; };
machine = { pkgs, ... }: { nodes.machine = { pkgs, ... }: {
environment.systemPackages = with pkgs; [ k3s gzip ]; environment.systemPackages = with pkgs; [ k3s gzip ];
# k3s uses enough resources the default vm fails. # k3s uses enough resources the default vm fails.

Some files were not shown because too many files have changed in this diff Show More