diff options
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/lib/build-vms.nix | 14 | ||||
-rw-r--r-- | nixos/lib/testing.nix | 13 | ||||
-rw-r--r-- | nixos/modules/misc/ids.nix | 4 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/services/x11/xserver.nix | 5 | ||||
-rw-r--r-- | nixos/tests/all-tests.nix | 3 | ||||
-rw-r--r-- | nixos/tests/statsd.nix | 51 |
7 files changed, 27 insertions, 64 deletions
diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix index 933f81392491..024f4414ebeb 100644 --- a/nixos/lib/build-vms.nix +++ b/nixos/lib/build-vms.nix @@ -1,4 +1,13 @@ -{ system, pkgs, minimal ? false, config ? {} }: +{ system +, # Use a minimal kernel? + minimal ? false +, # Ignored + config ? null + # Nixpkgs, for qemu, lib and more +, pkgs +, # NixOS configuration to add to the VMs + extraConfigurations ? [] +}: with pkgs.lib; with import ../lib/qemu-flags.nix { inherit pkgs; }; @@ -28,7 +37,8 @@ rec { ../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs { key = "no-manual"; documentation.nixos.enable = false; } { key = "qemu"; system.build.qemu = qemu; } - ] ++ optional minimal ../modules/testing/minimal-kernel.nix; + ] ++ optional minimal ../modules/testing/minimal-kernel.nix + ++ extraConfigurations; extraArgs = { inherit nodes; }; }; diff --git a/nixos/lib/testing.nix b/nixos/lib/testing.nix index f90fc9f7df0e..690f7dfd5fac 100644 --- a/nixos/lib/testing.nix +++ b/nixos/lib/testing.nix @@ -1,6 +1,13 @@ -{ system, pkgs, minimal ? false, config ? {} }: - -with import ./build-vms.nix { inherit system pkgs minimal config; }; +{ system +, pkgs + # Use a minimal kernel? +, minimal ? false + # Ignored +, config ? null + # Modules to add to each VM +, extraConfigurations ? [] }: + +with import ./build-vms.nix { inherit system pkgs minimal extraConfigurations; }; with pkgs; let diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index aff562c00eb1..082b2732cc58 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -101,7 +101,7 @@ iodined = 66; #libvirtd = 67; # unused graphite = 68; - statsd = 69; + #statsd = 69; # removed 2018-11-14 transmission = 70; postgres = 71; #vboxusers = 72; # unused @@ -411,7 +411,7 @@ iodined = 66; libvirtd = 67; graphite = 68; - #statsd = 69; # unused + #statsd = 69; # removed 2018-11-14 transmission = 70; postgres = 71; vboxusers = 72; diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 5e50a105e1b2..0869125b7127 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -452,7 +452,6 @@ ./services/monitoring/riemann-tools.nix ./services/monitoring/scollector.nix ./services/monitoring/smartd.nix - ./services/monitoring/statsd.nix ./services/monitoring/sysstat.nix ./services/monitoring/systemhealth.nix ./services/monitoring/teamviewer.nix diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index 070a02473437..34ae8c11a3f0 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -13,7 +13,8 @@ let # Map video driver names to driver packages. FIXME: move into card-specific modules. knownVideoDrivers = { - virtualbox = { modules = [ kernelPackages.virtualboxGuestAdditions ]; driverName = "vboxvideo"; }; + # Alias so people can keep using "virtualbox" instead of "vboxvideo". + virtualbox = { modules = [ xorg.xf86videovboxvideo ]; driverName = "vboxvideo"; }; # modesetting does not have a xf86videomodesetting package as it is included in xorgserver modesetting = {}; @@ -564,8 +565,6 @@ in knownVideoDrivers; in optional (driver != null) ({ inherit name; modules = []; driverName = name; } // driver)); - nixpkgs.config = optionalAttrs (elem "vboxvideo" cfg.videoDrivers) { xorg.abiCompat = "1.18"; }; - assertions = [ { assertion = config.security.polkit.enable; message = "X11 requires Polkit to be enabled (‘security.polkit.enable = true’)."; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 754a8ff20b26..ec7178ec9cad 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -99,7 +99,7 @@ in hydra = handleTest ./hydra {}; i3wm = handleTest ./i3wm.nix {}; iftop = handleTest ./iftop.nix {}; - incron = handleTest tests/incron.nix {}; + incron = handleTest ./incron.nix {}; influxdb = handleTest ./influxdb.nix {}; initrd-network-ssh = handleTest ./initrd-network-ssh {}; initrdNetwork = handleTest ./initrd-network.nix {}; @@ -190,7 +190,6 @@ in smokeping = handleTest ./smokeping.nix {}; snapper = handleTest ./snapper.nix {}; solr = handleTest ./solr.nix {}; - #statsd = handleTest ./statsd.nix {}; # statsd is broken: #45946 strongswan-swanctl = handleTest ./strongswan-swanctl.nix {}; sudo = handleTest ./sudo.nix {}; switchTest = handleTest ./switch-test.nix {}; diff --git a/nixos/tests/statsd.nix b/nixos/tests/statsd.nix deleted file mode 100644 index 666961249ced..000000000000 --- a/nixos/tests/statsd.nix +++ /dev/null @@ -1,51 +0,0 @@ -import ./make-test.nix ({ pkgs, lib, ... }: - -with lib; - -{ - name = "statsd"; - meta = with pkgs.stdenv.lib.maintainers; { - maintainers = [ ma27 ]; - }; - - machine = { - services.statsd.enable = true; - services.statsd.backends = [ "statsd-influxdb-backend" "console" ]; - services.statsd.extraConfig = '' - influxdb: { - username: "root", - password: "root", - database: "statsd" - } - ''; - - services.influxdb.enable = true; - - systemd.services.influx-init = { - description = "Setup Influx Test Base"; - after = [ "influxdb.service" ]; - before = [ "statsd.service" ]; - - script = '' - echo "CREATE DATABASE statsd" | ${pkgs.influxdb}/bin/influx - ''; - }; - }; - - testScript = '' - $machine->start(); - $machine->waitForUnit("statsd.service"); - $machine->waitForOpenPort(8126); - - # check state of the `statsd` server - $machine->succeed('[ "health: up" = "$(echo health | nc 127.0.0.1 8126 -w 120 -N)" ];'); - - # confirm basic examples for metrics derived from docs: - # https://github.com/etsy/statsd/blob/v0.8.0/README.md#usage and - # https://github.com/etsy/statsd/blob/v0.8.0/docs/admin_interface.md - $machine->succeed("echo 'foo:1|c' | nc -u -w 0 127.0.0.1 8125"); - $machine->succeed("echo counters | nc -w 120 127.0.0.1 8126 -N | grep foo"); - $machine->succeed("echo 'delcounters foo' | nc -w 120 127.0.0.1 8126 -N"); - $machine->fail("echo counters | nc -w 120 127.0.0.1 8126 -N | grep foo"); - ''; -}) |