Commit Graph

10118 Commits

Author SHA1 Message Date
Ihor Antonov
e4777ae2d8 Fix kernel panic on ec2 kvm instances caused by io timeout on nvme root volume 2018-05-12 02:55:33 +03:00
Uli Baum
ec00b6fbb3 nixos/mesos-slave: start after docker
If docker is enabled, start mesos-slave.service after docker.service
to avoid a race condition that could result in mesos-slave to fail
with "Failed to create docker: Timed out getting docker version"
2018-05-11 19:37:31 +02:00
Uli Baum
0d2a4ed49c nixos/tests/mesos: wait for all services and ports
to be available before sending requests.
Avoids non-deterministic test failure.
2018-05-11 19:26:35 +02:00
Robert Schütz
d283368d73
Merge pull request #39681 from pstn/gnunet-service
nixos/gnunet: create switch for package.
2018-05-11 14:13:17 +02:00
Sarah Brofeldt
0e1e0df243
Merge pull request #40304 from xeji/fix-graphite-test
nixos/tests/graphite: fix test
2018-05-11 13:56:56 +02:00
Philipp Steinpass
c3dba0b7a7 nixos/gnunet: create switch for package. 2018-05-11 13:54:00 +02:00
Yegor Timoshenko
35375aa7ed
hostapd: remove assertion (allow 5GHz channels) 2018-05-11 13:56:18 +03:00
Markus Hauck
d12afa6642 googleearth: init at 7.1.8.3036 2018-05-11 09:34:29 +02:00
Uli Baum
50efa1979d nixos/release-combined.nix: fix eval of tested job
bug introduced by f8d047da50
2018-05-11 00:47:43 +02:00
Uli Baum
840e5d8bda nixos/tests/graphite: fix test
- adapt netcat options to libressl-nc
- wait for services to be started and accepting connections
2018-05-10 23:30:56 +02:00
xeji
558f4b3368
nixos/tests/plotinus: fix non-deterministic failure (#40239)
Test failed sometimes, likely because a window didn't get focus.
2018-05-10 19:38:02 +02:00
xeji
f8d047da50
nixos/release-combined.nix: make tests consistent (#40131)
... with release-small.nix
Tests for small channel should be a subset of tests for full channel.
2018-05-10 19:36:58 +02:00
Robert Schütz
da58afdd68 nixos/tests/home-assistant: print log before failing 2018-05-10 13:12:35 +02:00
aszlig
67a8c66f68
nixos/dovecot: Fix usage of dhparams option
The pull request that added dhparams (#39507) was made at the time where
the dhparams module overhaul (#39526) wasn't done yet, so it's still
using the old mechanics of the module.

As stated in the release notes:

  Module implementers should not set a specific bit size in order to let
  users configure it by themselves if they want to have a different bit
  size than the default (2048).

  An example usage of this would be:

    { config, ... }:

    {
      security.dhparams.params.myservice = {};
      environment.etc."myservice.conf".text = ''
        dhparams = ${config.security.dhparams.params.myservice.path}
      '';
    }

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @qknight, @abbradar, @hrdinka, @leenaars
2018-05-10 08:29:29 +02:00
aszlig
fb9f5e4a03
nixos/testing: Fix output of systemd messages
Regression introduced by d4468bedb5.

No systemd messages are shown anymore during VM test runs, which is not
very helpful if you want to find out about failures.

There is a bit of a conflict between testing and the change that
introduced the regression. While the mentioned commit makes sure that
the primary console is tty0 for virtualisation.graphics = false, our VM
tests need to have the serial console as primary console.

So in order to support both, I added a new virtualisation.qemu.consoles
option, which allows to specify those options using the module system.

The default of this option is to use the changes that were introduced
and in test-instrumentation.nix we use only the serial console the same
way as before.

For test-instrumentation.nix I didn't add a baudrate to the serial
console because I can't find a reason on top of my head why it should
need it. There also wasn't a reason stated when that was introduced in
7499e4a5b9.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @flokli, @dezgeg, @edolstra
2018-05-10 08:21:20 +02:00
xeji
3d6f752c51
Merge pull request #39099 from teto/qemu_agent
qemu-guest-agent: init module
2018-05-10 01:22:52 +02:00
Sarah Brofeldt
3befef8279
Merge pull request #39671 from johanot/keepalived-vrrpInstanceTracking
nixos/keepalived: Implemented vrrp-instance track scripts and track interfaces
2018-05-09 20:54:36 +02:00
Emmanuel Rosa
0198bcc1eb gnucash: add upgrade instructions to NixOS release notes 2018-05-09 13:21:38 -04:00
jD91mZM2
77a6cbb1c1
zsh: move setEnvironment stuff to zprofile 2018-05-09 14:58:29 +02:00
Uli Baum
844698c436 nixos/tests/statsd: fix non-deterministic failure
Test failed sometimes because the service took more time to start.
2018-05-09 12:38:09 +02:00
Matthew Justin Bauer
dd55c957e2
Merge pull request #40051 from nh2/manual-option-types-attrs
manual: Document `types.attrs`
2018-05-09 07:55:17 +00:00
Matthew Justin Bauer
0b58a5b260
Merge pull request #40052 from flokli/input_leds-doc
modules/system/boot/luksroot: remove comment about input_leds for caps lock
2018-05-09 07:54:47 +00:00
Nikolay Amiantov
e711da345c base profile: add mkpasswd to system packages
Allows the user to generate password hashes for the installed system easier.
2018-05-09 00:20:02 +03:00
Nikolay Amiantov
a08645e9be nginx module: add upstream extraConfig 2018-05-08 16:32:11 +03:00
Joachim Schiele
851d5d72a3 dovecot2: added ssl_dh using security.dhparams
The 18.03 channel includes dovecot 2.3, which requires ssl_dh to be set.
-> fixes https://github.com/nixcloud/nixcloud-webservices/issues/21
2018-05-08 15:51:39 +03:00
jD91mZM2
6c4c36fcbc
NetworkManager: add noDns option 2018-05-08 13:42:39 +02:00
Johan Thomsen
41d4bd29ac nixos/keepalived: Implemented vrrp-instance tracking scripts and interfaces.
Tracking scripts in particular, cannot be included in extraOpts, because script declaration has to be above script usage in keepalived.conf.
Changes are fully backward compatible.
2018-05-08 11:25:53 +02:00
aszlig
78b4b90d6c
Merge pull request #39526 (improve dhparams)
This introduces an option that allows us to turn off stateful generation
of Diffie-Hellman parameters, which in some way is still "stateful" as
the generated DH params file is non-deterministic.

However what we can avoid with this is to have an increased surface for
failures during system startup, because generation of the parameters is
done during build-time.

Aside from adding a NixOS VM test it also restructures the type of the
security.dhparams.params option, so that it's a submodule.

A new defaultBitSize option is also there to allow users to set a
system-wide default.

I added a release notes entry that described what has changed and also
included a few notes for module developers using this module, as the
first usage already popped up in NixOS/nixpkgs#39507.

Thanks to @Ekleog and @abbradar for reviewing.
2018-05-08 02:09:46 +02:00
Florian Klink
7499e4a5b9 modules/virtualisation/qemu-vm: set console baudrate to 115200 2018-05-07 19:23:47 +03:00
Florian Klink
d4468bedb5 modules/virtualisation/qemu-vm: always enable serial console
Always enable both tty and serial console, but set preferred console
depending on cfg.graphical.
Even in qemu graphical mode, you can switch to the serial console via
Ctrl+Alt+3.

With that being done, you also don't need to specify
`systemd.services."serial-getty@ttyS0".enable = true;` either as described in
https://nixos.wiki/wiki/Cheatsheet#Building_a_service_as_a_VM_.28for_testing.29,
as systemd automatically spawns a getty on consoles passwd via cmdline.

This also means, vms built by 'nixos-rebuild build-vm' can simply be run
properly in nographic mode by appending `-nographic` to `result/bin/run-*-vm`,
without the need to explicitly add platform-specific QEMU_KERNEL_PARAMS.
2018-05-07 19:23:47 +03:00
Florian Klink
36f4b7f6ba virtualisation/qemu-vm.nix: remove ttys
unused.
2018-05-07 19:23:47 +03:00
Florian Klink
046e374c99 virtualisation/qemu-vm.nix: use lib.optionalString 2018-05-07 19:23:47 +03:00
Christoph Hrdinka
7e542f7f33
Merge pull request #40054 from aszlig/nsd-root-server
nixos/nsd: Allow to configure root zone
2018-05-07 13:55:30 +02:00
Matthew Justin Bauer
11df600bf8
Merge pull request #39680 from bgamari/fix-acme-post-stop
nixos/acme: Fix broken post-stop script
2018-05-07 04:19:49 +00:00
aszlig
a8b7372380
nixos: Add release notes about dhparams changes
This is not only to make users aware of the changes but also to give a
heads up to developers which are using the module. Specifically if they
rely on security.dhparams.path only.

Signed-off-by: aszlig <aszlig@nix.build>
2018-05-07 05:02:41 +02:00
aszlig
81fc2c3509
nixos/dhparams: Add a defaultBitSize option
This allows to set the default bit size for all the Diffie-Hellman
parameters defined in security.dhparams.params and it's particularly
useful so that we can set it to a very low value in tests (so it doesn't
take ages to generate).

Regardless for the use in testing, this also has an impact in production
systems if the owner wants to set all of them to a different size than
2048, they don't need to set it individually for every params that are
set.

I've added a subtest to the "dhparams" NixOS test to ensure this is
working properly.

Signed-off-by: aszlig <aszlig@nix.build>
2018-05-07 04:58:52 +02:00
aszlig
1eeeceb9c7
nixos/nsd: Allow to configure root zone
When trying to run NSD to serve the root zone, one gets the following
error message:

error: illegal name: '.'

This is because the name of the zone is used as the derivation name for
building the zone file. However, Nix doesn't allow derivation names
starting with a period.

So whenever the zone is "." now, the file name generated is "root"
instead of ".".

I also added an assertion that makes sure the user sets
services.nsd.rootServer, otherwise NSD will fail at runtime because it
prevents serving the root zone without an explicit compile-time option.

Tested this by adding a root zone to the "nsd" NixOS VM test.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @hrdinka, @qknight
2018-05-07 04:05:41 +02:00
Florian Klink
5855459f49 modules/system/boot/luksroot: remove comment about input_leds for caps lock
Since f2a9f9aeab, we already load
"input_leds", so this comment isn't useful anymore.
2018-05-07 01:42:37 +02:00
Niklas Hambüchen
6e7f4f99d1 manual: Document types.attrs
Signed-off-by: Niklas Hambüchen <mail@nh2.me>
2018-05-07 00:36:39 +02:00
Joachim F
e97d8fc0cb
Merge pull request #39455 from Ekleog/matterbridge-configfile
matterbridge module: add configPath option as a workaround, waiting for nix encryption
2018-05-06 17:29:43 +00:00
Tristan Helmich
560e91f1a7 nixos/matrix-synapse service: url_preview_url_blacklist fix (#40027)
Moved list of ip ranges to url_preview_ip_range_blacklist defaults.
Fixes #40017
2018-05-06 09:49:04 +00:00
xeji
cd960b965f
Merge pull request #38622 from obadz/minidlna-module
nixos/minidlna: add loglevel config
2018-05-06 00:13:39 +02:00
xeji
76c8e5ea3b
Merge pull request #39055 from abbradar/reload-stop
firewall service: run stop commands in reload
2018-05-05 22:13:15 +02:00
Joachim F
1be056ca30
Merge pull request #40000 from JohnAZoidberg/docmodule-optional-fix
nixos/documentation: Correct use of lib.optional
2018-05-05 20:09:44 +00:00
Tuomas Tynkkynen
bc828721ed nixos/lib/make-ext4-fs: Add a sanity check
I ended up with a corrupted image with the debugfs contraption once, and
given I couldn't reproduce the problem I suppose that happens if the
filesystem of the builder runs out of space.

At least in this instance fsck could detect it, so let's add it as a
sanity check.
2018-05-05 19:30:54 +03:00
Daniel Schaefer
43650115e3 nixos/documentation: Correct use of lib.optional
lib.optional returns a singleton or an empty list. Therefore the
argument does not need to be wrapped in a list.
An alternative patch could have used lib.optionals but seems like no
more elements are going to be added to the optional list.
2018-05-05 15:55:53 +07:00
Jaka Hudoklin
3ec4528dcf
Merge pull request #39991 from xeji/remove-fleet
fleet, panamax: remove
2018-05-05 08:07:14 +02:00
gnidorah
9f1da66587 ndppd module: init (#35533) 2018-05-05 00:33:20 -05:00
bricewge
21b926003d sshguard: service creates /var/lib/sshguard 2018-05-05 00:29:44 -05:00
Matthew Justin Bauer
bcf8e74986
Merge pull request #39938 from edef1c/net-dbus-list-units
switch-to-configuration: use Net::DBus to retrieve the list of units
2018-05-04 23:26:56 -05:00
Uli Baum
c3eefe801a fleet: remove package, module, test
deprecated and unmaintained upstream
2018-05-05 00:28:16 +02:00
Uli Baum
f039bf9abc panamax: remove packages, module and test
was broken and depends on (deprecated) fleet
packages: panamax_api, panamax_ui
2018-05-05 00:27:15 +02:00
Matthew Justin Bauer
8723594059
rl-1809: add googleearth 2018-05-04 14:41:13 -05:00
Tad Fisher
19445fa145 nixos/powerManagement: add "med_power_with_dipm" scsiLinkPolicy 2018-05-04 10:33:42 -07:00
Pascal Bach
7f53ee8412 restic-rest-server module: init 2018-05-04 16:55:06 +02:00
Tor Hedin Brønner
5777272bd2 nixos/plymouth: multi-user.target wants plymouth-quit-wait.service
This is apparent from the service file directory in plymouth:
├── multi-user.target.wants
│   ├── plymouth-quit.service -> ../plymouth-quit.service
│   └── plymouth-quit-wait.service -> ../plymouth-quit-wait.service

Leaving it unspecified caused gdm-wayland to crash on boot, see #39615.

The change made other display managers not quit plymouth properly however. By
removing "multi-user.target" from `plymouth-quit.after` this is resolved.
2018-05-04 16:06:57 +02:00
Eelco Dolstra
9d0b6b9dfc
nix: 2.0.1 -> 2.0.2 2018-05-04 13:28:36 +02:00
edef
54a13b07d5 switch-to-configuration: use Net::DBus to retrieve the list of units
This resolves the FIXME, and opens up the possibility of using more of
the systemd DBus interface to make things more robust.
2018-05-03 20:19:23 +02:00
Rob Vermaas
41512bfdae
Merge pull request #39654 from AmineChikhaoui/issue-38623
GCE: pull the ssh host keys from the metadata service as expected by NixOps.
2018-05-03 17:16:26 +02:00
Matthew Bauer
ca30c5e061 Revert "Merge pull request #28206 from edef1c/net-dbus-list-units"
This reverts commit e508f0eec1, reversing
changes made to bead42df5d.
2018-05-02 15:02:29 -05:00
Antoine Eiche
d35dcb1280 dockerTools.pullImage: documentation and release note 2018-05-02 21:32:20 +02:00
Matthew Justin Bauer
e508f0eec1
Merge pull request #28206 from edef1c/net-dbus-list-units
switch-to-configuration: use Net::DBus to retrieve the list of units
2018-05-02 12:49:37 -05:00
WilliButz
27eb2859f2 prometheus-nginx-exporter: fix bool to string coercion 2018-05-02 16:18:20 +02:00
Robin Gloster
fe9096ef09
Merge branch 'master' into docker-registry-enhancements 2018-05-02 13:12:57 +02:00
Samuel Leathers
78f09c9102 nixos/prometheus-surfboard-exporter: add new module 2018-05-02 13:04:34 +02:00
Graham Christensen
eca5c99bf8
nixos docs: format =) 2018-05-01 19:57:09 -04:00
Graham Christensen
fd2dce9708
nixos docs: ignore generated files 2018-05-01 19:50:02 -04:00
Graham Christensen
9d4b966c4d
nixos docs: fixup 2018-05-01 19:43:52 -04:00
Graham Christensen
4f5a995b03
Merge pull request #39786 from grahamc/format-nixpkgs-docs-target
nixpkgs doc: add format Make target
2018-05-01 19:39:31 -04:00
Graham Christensen
374a3bdf5b
nixos docs: makefile for formatting 2018-05-01 18:03:25 -04:00
Matthew Justin Bauer
c46c5b8f4e
Merge pull request #39836 from flokli/virtualbox-5.2.10
virtualbox: 5.2.8 -> 5.2.10
2018-05-01 16:32:48 -05:00
Florian Klink
d3527d947f virtualisation.virtualbox.host: migrate from mkOption to mkEnableOption 2018-05-01 22:47:54 +02:00
Florian Klink
92e559212a virtualisation.virtualbox.host: introduce enableExtensionPack 2018-05-01 22:47:46 +02:00
Austin Seipp
5a24d99fa6 foundationdb: split into multiple, major-versioned packages to make upgrades user-controllable
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-05-01 15:47:36 -05:00
Austin Seipp
55eec81118 nixos: add TLS support to FoundationDB module, and tweak setup a bit
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-05-01 15:47:36 -05:00
Austin Seipp
ed5cbbbc44 foundationdb: install the java client library
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2018-05-01 15:47:36 -05:00
edef
1a18fedae4 nixos doc: mananager -> manager 2018-05-01 19:58:50 +02:00
WilliButz
cb4c2834ef nixos/prometheus-varnish-exporter: update module 2018-05-01 18:00:53 +02:00
Matthew Justin Bauer
4e58e23262
Merge pull request #39478 from pngwjpgh/infinoted
nixos/infinoted: Abstract over libinfinity version
2018-05-01 10:22:25 -05:00
Michael Weiss
1b8642dff6
nixos/monetdb: init (#39812) 2018-05-01 16:44:12 +02:00
WilliButz
de60146f59 nixos/promtheus-nginx-exporter: update module 2018-05-01 15:45:48 +02:00
Michele Catalano
afd3136e8e
nixos/docker-registry: Add support for garbage collector to docker registry 2018-05-01 15:23:47 +02:00
Maximilian Bosch
593dc45141
nixos/docker-registry: cleanup module definition & enhance testcase
The following changes have been applied:

- the property `http.headers.X-Content-Type-Options` must a list of
  strings rather than a serialized list
- instead of `/etc/docker/registry/config.yml` the configuration will be
  written with `pkgs.writeText` and the store path will be used to run
  the registry. This reduces the risk of possible impurities by relying
  on the Nix store only.
- cleaned up the property paths to easy readability and reduce the
  verbosity.
- enhanced the testcase to ensure that digests can be deleted as well
- the `services.docker-registry.extraConfig` object will be merged with
  `registryConfig`

/cc @ironpinguin
2018-05-01 15:23:39 +02:00
Michele Catalano
f5c0b3f887
nixos/docker-registry: add more configuration options for docker-registry 2018-05-01 14:53:50 +02:00
Graham Christensen
5d03cce7ed
Merge pull request #38351 from grahamc/user-channels
Add user channels to the default nix path
2018-05-01 07:19:38 -04:00
Graham Christensen
8ab8d9cb74
Add user channels to the default nix path 2018-05-01 06:30:31 -04:00
Julien Langlois
519b64592d hitch: init at 1.4.8 + service + test (#39358)
Add the Hitch TLS reverse proxy as an option for TLS termination.
2018-05-01 10:36:36 +01:00
Jörg Thalheim
101dca2d9a
Merge pull request #39798 from lheckemann/nixos-install-chroot-doc
nixos-install manual: remove --chroot option
2018-05-01 08:21:31 +01:00
Linus Heckemann
152454d987 nixos-install manual: remove --chroot option
This option has been removed from the tool in favour of nixos-enter.
2018-05-01 07:36:35 +01:00
Graham Christensen
ab1648bf0d
nixpkgs doc: add format Make target 2018-04-30 22:37:58 -04:00
Graham Christensen
d1165dba99
Merge pull request #38831 from rdnetto/improve-cross-refs
Improve cross referencing in NixOS Manual
2018-04-30 21:30:20 -04:00
Milo
b405a6537c nixos/bspwm: spawn bpswm process in the background and properly set waiPID (#39707) 2018-04-30 17:03:05 +00:00
Maximilian Bosch
e12cc85b07
nixos/osquery: add test
Some time ago I fixed the broken package `osquery` (see #39336).
I had to test the package manually by starting the daemon locally,
however this doesn't ensure that the module is still functional.

In order to cover the package *and* the integration with the NixOS
module I thought that adding a testcase might be the best idea.

The current testcase does the following things:

* Starts an `osqueryd` service in a test machine with customized logger
  path and PID file

* Ensures that the `osqueryd.service` unit is running

* Checks if the customized flags (`pidfile`, `logger_path`) are applied
  to `osquery`.

* Performs a simple test query against the `etc_hosts` database to check
  if the basic funcitonality of `osquery` (storing system information into
  a database) works fine.
2018-04-30 16:49:38 +02:00
Michael Raskin
fd8dcdfa9d
Merge pull request #39416 from Ma27/fix-.version-config
.version: don't read from `.version` and deduplicate `.version-suffix` references
2018-04-30 08:33:19 +00:00
aszlig
b3d5ca8359
nixos/dhparams: Set default bit size to 2048
@Ekleog writes in https://github.com/NixOS/nixpkgs/pull/39526:

> I think a default of 4096 is maybe too much? See certbot/certbot#4973;
> Let's Encrypt supposedly know what they are doing and use a
> pre-generated 2048-bit DH params (and using the same DH params as
> others is quite bad, even compared to lower bit size, if I correctly
> remember the attacks available -- because it increases by as much the
> value of breaking the group).

> Basically I don't have anything personal against 4096, but fear it may
> re-start the arms race: people like having "more security" than their
> distributions, and having NixOS already having more security than is
> actually useful (I personally don't know whether a real-size quantum
> computer will come before or after our being able to break 2048-bit
> keys, let alone 3072-bit ones -- see wikipedia for some numbers).

> So basically, I'd have set it to 3072 in order to both decrease build
> time and avoid having people setting it to 8192 and complaining about
> how slow things are, but that's just my opinion. :)

While he suggests is 3072 I'm using 2048 now, because it's the default
of "openssl dhparam". If users want to have a higher value, they can
still change it.

Signed-off-by: aszlig <aszlig@nix.build>
2018-04-30 05:53:38 +02:00
Graham Christensen
8caaec894e
Merge pull request #39649 from grahamc/hacking-docs
NixOS docs: making it easier to hack on
2018-04-29 21:56:45 -04:00
aszlig
f148c5c4a1
nixos/tests: Fix QEMU flags for SCSI disks
The ability to specify "-drive if=scsi" has been removed in QEMU version
2.12 (introduced in 3e3b39f173).

Quote from https://wiki.qemu.org/ChangeLog/2.12#Incompatible_changes:

> The deprecated way of configuring SCSI devices with "-drive if=scsi"
> on x86 has been removed. Use an appropriate SCSI controller together
> "-device scsi-hd" or "-device scsi-cd" and a corresponding "-blockdev"
> parameter instead.

So whenever the diskInterface is "scsi" we use the new way to specify
the drive and fall back to the deprecated way for the time being. The
reason why I'm not using the new way for "virtio" and "ide" as well is
because there is no simple generic way anymore to specify these.

This also turns the type of the virtualisation.qemu.diskInterface option
to be an enum, so the user knows which values are allowed but we can
also make sure the right value is provided to prevent typos.

I've tested this against a few non-disk-related NixOS VM tests but also
the installer.grub1 test (because it uses "ide" as its drive interface),
the installer.simple test (just to be sure it still works with
"virtio") and all the tests in nixos/tests/boot.nix.

In order to be able to run the grub1 test I had to go back to
8b1cf100cd (which is a known commit where
that test still works) and apply the QEMU update and this very commit,
because right now the test is broken.

Apart from the tests here in nixpkgs, I also ran another[1] test in
another repository which uses the "scsi" disk interface as well (in
comparison to most of the installer tests, this one actually failed
prior to this commit).

All of them now succeed.

[1]: 9b5a119972/tests/system/kernel/bfq.nix

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @edostra, @grahamc, @dezgeg, @abbradar, @ts468
2018-04-30 03:02:59 +02:00
aszlig
1907120f23
nixos/tests/udisks2: Fix USB device hotplug
The usb_add and usb_del monitor commands have been removed in QEMU
version 2.12 (introduced in 3e3b39f173).

Quote from https://wiki.qemu.org/ChangeLog/2.12#Incompatible_changes:

> The deprecated HMP commands "usb_add" and "usb_del" have been removed.
> Use "device_add" and "device_del" as replacement instead.

So we're doing exactly that and the udisks2 test now works again.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @edolstra
2018-04-30 03:02:57 +02:00
Matthew Justin Bauer
f12b93162a
rl-1809: add netcat note 2018-04-29 18:30:42 -05:00
aszlig
146cb02542
nixos/tests/hibernate: Fix netcat flags
I'm not sure why 024b501907 used -q 0
because even netcat-openbsd has the -N flag which IMO is the better way
to shutdown the socket on EOF.

Our default netcat implementation has changed once again[1] in
3c3b82234a and we're now using LibreSSL's
implementation, which doesn't have a -q flag.

See https://github.com/NixOS/nixpkgs/pull/39634 for the pull request
introducing the switch.

[1]: https://github.com/NixOS/nixpkgs/pull/19982

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @matthewbauer, @dtzWill, @Mic92
2018-04-29 23:46:47 +02:00
xeji
1937b810b6
Merge pull request #39340 from xeji/interim-fix-39069
nixos/networkd: wait for udev to settle before starting networkd
2018-04-29 20:45:09 +02:00
Ben Gamari
7d68eadf37 nixos/acme: Fix broken post-stop script
Previously the script would contain an empty `if` block (which is invalid
syntax) if both `data.activationDelay == null` and `data.postRun == ""`. Fix
this by adding a no-op `true`.
2018-04-29 13:32:02 -04:00
aszlig
97adb03a9e
nixos/tests/predictable-interface-names: Refactor
The Nix expression here is really hard to read with multiple (and
unnecessarily) nested lets and it also generates attribute names based
on the derivation generated by makeTest, which will result in these
attribute names:

  * vm-test-run-predictableInterfaceNames
  * vm-test-run-predictableInterfaceNames-with-networkd
  * vm-test-run-unpredictableInterfaceNames
  * vm-test-run-unpredictableInterfaceNames-with-networkd

With the refactor the attribute names are now:

  * predictable
  * predictableNetworkd
  * unpredictable
  * unpredictableNetworkd

So now the code is even shorter and IMHO slightly more readable.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @symphorien, @fpletz, @adisbladis
2018-04-29 15:36:56 +02:00
Peter Hoeg
3c63bda681
Merge pull request #39137 from peterhoeg/m/lcd
nixos lcdproc: module for lcdd/lcdproc
2018-04-28 22:57:59 +00:00
Tim Steinbach
9774c8a0de
linux-copperhead: Fix test 2018-04-28 20:20:47 +00:00
AmineChikhaoui
f514a68969
barf if pulling the ssh host keys fails 2018-04-28 17:07:54 +01:00
AmineChikhaoui
4a86f8c9ab
remove the entire temporary directory 2018-04-28 17:06:25 +01:00
AmineChikhaoui
3b8c7424d1
pull the ssh host keys from the metadata service as expected by NixOps.
Issues: #38623 https://github.com/NixOS/nixops/issues/930.
2018-04-28 16:52:46 +01:00
aszlig
1b1b76f70a
nixos/tests/chromium: Wait 10s after new window
This is a very very very ugly workaround and it's because Chromium seems
to eat keystroke for a few seconds after a new window is created.

I haven't found a better solution yet, so let's at least unbreak the
test until we come up with a better way.

Thanks to @vcunat for bringing this to my attention and also doing the
initial bisect.

The change that brought up this problem was 2b29e40153,
which updated Chromium from version 65.0.3325.181 to version
66.0.3359.117. Unfortunately the upstream changelog[1] is way too large
to actually guess what the breaking change is.

[1]: https://chromium.googlesource.com/chromium/src/+log/65.0.3325.181..66.0.3359.117?pretty=fuller&n=10000

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @bendlas, @vcunat
2018-04-28 17:35:13 +02:00
Maximilian Bosch
9274ea3903
treewide: rename version attributes
As suggested in https://github.com/NixOS/nixpkgs/pull/39416#discussion_r183845745
the versioning attributes in `lib` should be consistent to
`nixos/version` which implicates the following changes:

* `lib.trivial.version` -> `lib.trivial.release`
* `lib.trivial.suffix` -> `lib.trivial.versionSuffix`
* `lib.nixpkgsVersion` -> `lib.version`

As `lib.nixpkgsVersion` is referenced several times in `NixOS/nixpkgs`,
`NixOS/nix` and probably several user's setups. As the rename will cause
a notable impact it's better to keep `lib.nixpkgsVersion` as alias with
a warning yielded by `builtins.trace`.
2018-04-28 14:23:53 +02:00
Maximilian Bosch
39909289f4
lib: deduplicate version/suffix references
The logic regarding the generated `.version-suffix` file is already
defined in `lib/trivial.nix` and shouldn't be duplicated in
`nixos/version`.
2018-04-28 14:23:13 +02:00
Jörg Thalheim
f9fe798f95
Merge pull request #39612 from bgamari/cupsd-loglevel
cupsd: Introduce services.printing.logLevel option
2018-04-28 12:50:48 +01:00
Tuomas Tynkkynen
dda74d9e50 nixos/qemu-vm: Always add a virtio RNG device to the quest
mke2fs has this annoying property that it uses getrandom() to get random
numbers (for whatever purposes) which blocks until the kernel's secure
RNG has sufficient entropy, which it usually doesn't in the early boot
(except if your CPU supports RDRAND) where we may need to create the
root disk.

So let's give the VM a virtio RNG to avoid the boot getting stuck at
mke2fs.
2018-04-28 12:48:06 +03:00
Graham Christensen
74fcb1c770
nixos docs: include note about make for debugging the nixos docs 2018-04-28 04:15:16 -04:00
Graham Christensen
a77dc213a7
nixos manual: update xi:include for configuruation.nix's options-db 2018-04-28 04:04:56 -04:00
Graham Christensen
0ff0d138e4
nixos docs: Add a makefile for hacking on the nixos docs 2018-04-28 04:00:55 -04:00
Graham Christensen
59f8b1e844
nixos docs: Move generated XML in to a specific subdirectory to allow easier hacking 2018-04-27 22:44:51 -04:00
Graham Christensen
68d48cecf6
Merge pull request #31418 from ryantm/doc-nixos-extra-module-path
lib/eval-config: document NIXOS_EXTRA_MODULE_PATH
2018-04-27 21:26:06 -04:00
Sarah Brofeldt
b15e884f80
Merge pull request #39617 from Mic92/nixos-generate-config
nixos/nixos-generate-config: update search command
2018-04-28 00:33:21 +02:00
Matthew Justin Bauer
1c9dc7daa1
Merge pull request #39459 from oxij/nixos/isolinux
nixos: installer: cleanup a bit
2018-04-27 17:30:51 -05:00
Badi Abdul-Wahid
df3566c956 unifi, nixos/unifi: support LTS (5.6.36) and release (5.7.20)
Ubiquiti has both a LTS and current version of their Unifi controller software.

The latter adds new features, but may drop support for some devices.

This adds the capability to use either for the unifi module but defaults
to the LTS version, which was the previous behavior.
2018-04-28 00:27:33 +02:00
Jörg Thalheim
91e58ad48a
Merge pull request #39613 from bgamari/networkd-requiredforonline
networkd: Allow RequiredForOnline field in [Link] section
2018-04-27 23:21:34 +01:00
Jörg Thalheim
468f3ce0ed nixos/xserver: remove nvidiaLegacy173 from videoDrivers.examples
see 92265e807e (commitcomment-28773179)
2018-04-27 23:02:09 +01:00
xeji
06a3f2033f
Merge pull request #39431 from fdietze/patch-1
nixos manual: Fix typo in Syntax Summary
2018-04-27 23:10:26 +02:00
Yegor Timoshenko
6e33df0f6f
Merge pull request #39008 from serokell/youtrack
Youtrack package and service
2018-04-27 22:16:57 +03:00
Yegor Timoshenko
e71c36369f
Merge pull request #39002 from serokell/oauth2_proxy_mod
oauth2_proxy: refactor service
2018-04-27 22:15:50 +03:00
Jörg Thalheim
e8d5070e23 nixos/nixos-generate-config: update search command 2018-04-27 18:19:05 +01:00
Jan Malakhovski
92265e807e nixos: xserver: add related packages 2018-04-27 18:10:04 +01:00
Jan Malakhovski
5ec94de03c nixos: alsa: better docstring 2018-04-27 18:07:19 +01:00
Profpatsch
900cec79a0 lib/debug: add replacement instructions & release notes
for every deprecated function.
2018-04-27 18:59:39 +02:00
Profpatsch
b90104ea0e lib/debug: fix use-sites of deprecated debug functions 2018-04-27 18:59:39 +02:00
Ben Gamari
192352ff2f nixos/cupsd: Introduce services.printing.logLevel option
Previously we indirectly suggested that the user use
services.printing.extraConf to set this, but this doesn't work with the
default merge ordering. Fix this by making it an independent option.
Fixes #39611.
2018-04-27 16:41:49 +00:00
Ben Gamari
65c1cfce3f nixos/networkd: Allow RequiredForOnline field in [Link] section
This was previously missing.
2018-04-27 16:41:16 +00:00
Yorick van Pelt
000482ffc4
youtrack: add service 2018-04-27 17:33:41 +02:00
Yorick van Pelt
048c991eb0
oauth2_proxy: use explicit upstream default for setXauthrequest 2018-04-27 16:45:38 +02:00
Rodney Lorrimar
3e446ecd56 nixos/buildkite-agent: fix variable expansion in hook scripts
@cleverca found this bug in the declarative hooks config. Any shell
variables referenced in a hook script would get expanded by the hooks
directory builder.

Prevent variable expansion by quoting the here doc limit string.
2018-04-27 12:17:40 +01:00
Matthieu Coudron
ca0604190e qemu-guest-agent: init module
Allow out of band communication between qemu VMs and the host.
Useful to retrieve IPs of VMs from the host (for instance when libvirt can't analyze
DHCP requests because VMs are configured with static addresses or when
there is connectivity default).
2018-04-27 18:32:15 +09:00
Vladimír Čunát
88695c6e94
Revert "release-combined: don't include tests.chromium"
This reverts commit 1d06254998.
We now get a build and maybe have a workaround #39570; /cc #39476.
2018-04-27 02:42:12 +02:00
Franz Pletz
dc62e8509a
nixos/caddy: fix ca api endpoint, now uses v2 2018-04-27 01:11:54 +02:00
Matthew Justin Bauer
1d06254998
release-combined: don't include tests.chromium
The chromium package will frequently time out . Note that this is unrelated to the test but a side effect because the test depends on chromium.

https://hydra.nixos.org/job/nixos/trunk-combined/nixos.tests.chromium.x86_64-linux

See also #39476
2018-04-26 10:14:51 -05:00
Nikolay Amiantov
b827307c52 dante service: default for logoutput
Log to journald via syslog by default; also improve option type.
2018-04-26 13:57:11 +03:00
Nikolay Amiantov
bd140fb41d dante service: restart only on failure
Normal exit code shouldn't result in a restart.
2018-04-26 13:57:11 +03:00
Gregor Kleen
274579cc95 nixos/infinoted: Abstract over libinfinity version 2018-04-26 08:35:00 +02:00
aszlig
ce87773867
nixos/dhparams: Clean up module expression
First of all let's start with a clean up the multiline string
indentation for descriptions, because having two indentation levels
after description is a waste of screen estate.

A quick survey in the form of the following also reveals that the
majority of multiline strings in nixpkgs is starting the two beginning
quotes in the same line:

$ find -name '*.nix' -exec sed -n -e '/=$/ { n; /'\'\''/p }' {} + | wc -l
817
$ find -name '*.nix' -exec grep "= *'' *\$" {} + | wc -l
14818

The next point is to get the type, default and example attributes on top
of the description because that's the way it's rendered in the manual.

Most services have their enable option close to the beginning of the
file, so let's move it to the top.

Also, I found the script attribute for dhparams-init.service a bit hard
to read as it was using string concatenation to split a "for" loop.

Now for the more substantial clean ups rather than just code style:

  * Remove the "with lib;" at the beginning of the module, because it
    makes it easier to do a quick check with "nix-instantiate --parse".
  * Use ConditionPathExists instead of test -e for checking whether we
    need to generate the dhparams file. This avoids spawning a shell if
    the file exists already and it's probably more common that it will
    exist, except for the initial creation of course.
  * When cleaning up old dhparams file, use RemainAfterExit so that the
    unit won't be triggered again whenever we stop and start a service
    depending on it.
  * Capitalize systemd unit descriptions to be more in par with most
    other unit descriptions (also see 0c5e837b66).
  * Use "=" instead of "==" for conditionals using []. It's just a very
    small nitpick though and it will only fail for POSIX shells. Bash on
    the other side accepts it anyway.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Ekleog
2018-04-26 08:04:52 +02:00
aszlig
3e11ff6e0d
nixos/dhparams: Introduce a 'stateful' option
This option allows us to turn off stateful generation of Diffie-Hellman
parameters, which in some way is still stateful as the generated DH
params file is non-deterministic.

However what we can avoid with this is to have an increased surface for
failures during system startup, because generation of the parameters is
done during build-time.

Another advantage of this is that we no longer need to take care of
cleaning up the files that are no longer used and in my humble opinion I
would have preferred that #11505 (which puts the dhparams in the Nix
store) would have been merged instead of #22634 (which we have now).

Luckily we can still change that and this change gives the user the
option to put the dhparams into the Nix store.

Beside of the more obvious advantages pointed out here, this also
effects test runtime if more services are starting to use this (for
example see #39507 and #39288), because generating DH params could take
a long time depending on the bit size which adds up to test runtime.

If we generate the DH params in a separate derivation, subsequent test
runs won't need to wait for DH params generation during bootup.

Of course, tests could still mock this by force-disabling the service
and adding a service or activation script that places pre-generated DH
params in /var/lib/dhparams but this would make tests less readable and
the workaround would have to be made for each test affected.

Note that the 'stateful' option is still true by default so that we are
backwards-compatible with existing systems.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Ekleog, @abbradar, @fpletz
2018-04-26 08:04:50 +02:00
aszlig
761266bd18
nixos/dhparams: Turn params into a submodule
We're going to implement an option which allows us to turn off stateful
handling of Diffie-Hellman parameter files by putting them into the Nix
store.

However, modules now might need a way to reference these files, so we
add a now path option to every param specified, which carries a
read-only value of the path where to find the corresponding DH params
file.

I've also improved the description of security.dhparams.params a bit so
that it uses <warning/> and <note/>.

The NixOS VM test also reflects this change and checks whether the old
way to specify the bit size still works.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Ekleog
2018-04-26 08:04:48 +02:00
aszlig
4de774a63b
nixos/dhparams: Add a VM test
We're going to make changes to the dhparams module so we really want to
make sure we don't break it, so having a NixOS VM test is to make sure
we don't blow things up and can iterate on it.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @Ekleog
2018-04-26 08:04:45 +02:00
Robin Gloster
94f5e5ad14
Revert "gitlab: disable"
This reverts commit 68c4605f1a.

Gitlab has been fixed
2018-04-26 00:15:24 +02:00
Robin Gloster
783fb86de4
gitlab module: update to gitlab 10.7 2018-04-26 00:15:24 +02:00
Matthew Justin Bauer
e4d2d32a32
Merge pull request #33679 from flokli/deluge-module
Deluge: use mkEnableOption, add test
2018-04-25 14:54:34 -05:00