Disable allowUnfree by default

Fixes #2134.
This commit is contained in:
Eelco Dolstra 2014-04-09 00:09:31 +02:00
parent dcd0e68b17
commit e09250d41c
4 changed files with 30 additions and 6 deletions

View file

@ -7,7 +7,7 @@
<section xml:id="sec-release-14.02">
<title>Release 14.02 (“Baboon”, 2014/02/??)</title>
<title>Release 14.04 (“Baboon”, 2014/04/??)</title>
<para>This is the second stable release branch of NixOS. The main
enhancements are the following:
@ -18,7 +18,7 @@ enhancements are the following:
<xref linkend="sec-uefi-installation"/> for
details.</para></listitem>
<listitem><para>NixOS is now based on Glibc 2.18 and GCC
<listitem><para>NixOS is now based on Glibc 2.19 and GCC
4.8.</para></listitem>
</itemizedlist>
@ -30,6 +30,23 @@ following incompatible changes:
<itemizedlist>
<listitem><para>Nixpkgs no longer exposes unfree packages by
default. If your NixOS configuration requires unfree packages from
Nixpkgs, you need to enable support for them explicitly by setting:
<programlisting>
nixpkgs.config.allowUnfree = true;
</programlisting>
Otherwise, you get an error message such as:
<screen>
error: package nvidia-x11-331.49-3.12.17 in ‘…/nvidia-x11/default.nix:56
has an unfree license, refusing to evaluate
</screen>
</para></listitem>
<listitem><para>The firewall is now enabled by default. If you dont
want this, you need to disable it explicitly:

View file

@ -26,10 +26,15 @@ rec {
# These are the extra arguments passed to every module. In
# particular, Nixpkgs is passed through the "pkgs" argument.
# FIXME: we enable config.allowUnfree to make packages like
# nvidia-x11 available. This isn't a problem because if the user has
# nixpkgs.config.allowUnfree = false, then evaluation will fail on
# the 64-bit package anyway. However, it would be cleaner to respect
# nixpkgs.config here.
extraArgs = extraArgs_ // {
inherit pkgs modules baseModules;
modulesPath = ../modules;
pkgs_i686 = import ./nixpkgs.nix { system = "i686-linux"; };
pkgs_i686 = import ./nixpkgs.nix { system = "i686-linux"; config.allowUnfree = true; };
utils = import ./utils.nix pkgs;
};

View file

@ -18,7 +18,6 @@ in {
};
productData = mkOption {
default = "${pkgs.fprot}/opt/f-prot/product.data";
description = ''
product.data file. Defaults to the one supplied with installation package.
'';
@ -32,7 +31,6 @@ in {
};
licenseKeyfile = mkOption {
default = "${pkgs.fprot}/opt/f-prot/license.key";
description = ''
License keyfile. Defaults to the one supplied with installation package.
'';
@ -45,6 +43,10 @@ in {
###### implementation
config = mkIf cfg.updater.enable {
services.fprot.updater.productData = "${pkgs.fprot}/opt/f-prot/product.data";
services.fprot.updater.licenseKeyfile = "${pkgs.fprot}/opt/f-prot/license.key";
environment.systemPackages = [ pkgs.fprot ];
environment.etc = singleton {
source = "${pkgs.fprot}/opt/f-prot/f-prot.conf";

View file

@ -14,7 +14,7 @@ let lib = import ../../../lib; in lib.makeOverridable (
let
allowUnfree = config.allowUnfree or true && builtins.getEnv "HYDRA_DISALLOW_UNFREE" != "1";
allowUnfree = config.allowUnfree or false && builtins.getEnv "HYDRA_DISALLOW_UNFREE" != "1";
allowBroken = builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1";