nixpkgs/nixos
aszlig 68efd790b8
nixos: Don't enable Docker by default
Regression introduced by c94005358c.

The commit introduced declarative docker containers and subsequently
enables docker whenever any declarative docker containers are defined.

This is done via an option with type "attrsOf somesubmodule" and a check
on whether the attribute set is empty.

Unfortunately, the check was whether a *list* is empty rather than
wether an attribute set is empty, so "mkIf (cfg != [])" *always*
evaluates to true and thus subsequently enables docker by default:

$ nix-instantiate --eval nixos --arg configuration {} \
    -A config.virtualisation.docker.enable
true

Fixing this is simply done by changing the check to "mkIf (cfg != {})".

Tested this by running the "docker-containers" NixOS test and it still
passes.

Signed-off-by: aszlig <aszlig@nix.build>
Cc: @benley, @danbst, @Infinisil, @nlewo
2019-03-26 07:10:18 +01:00
..
doc Merge pull request #57617 from aaronjanse/patch-20190313a 2019-03-25 22:16:47 -04:00
lib nixos: doc: optionally include all modules in manual generation 2019-03-05 09:41:40 +00:00
maintainers amazon-image.nix: Resolve failure to include resize2fs 2019-03-15 17:33:45 +01:00
modules nixos: Don't enable Docker by default 2019-03-26 07:10:18 +01:00
tests Merge pull request #57925 from rnhmjoj/ifnames-fix 2019-03-25 22:23:11 -04:00
COPYING
default.nix
README
release-combined.nix nixos/release: make ipv6 tests as important as legacy IP tests 2019-03-24 18:09:39 +01:00
release-small.nix nixos/release: make ipv6 tests as important as legacy IP tests 2019-03-24 18:09:39 +01:00
release.nix

*** NixOS ***

NixOS is a Linux distribution based on the purely functional package
management system Nix.  More information can be found at
http://nixos.org/nixos and in the manual in doc/manual.