···105 /* Massage a module into canonical form, that is, a set consisting
106 of ‘options’, ‘config’ and ‘imports’ attributes. */
107 unifyModuleSyntax = file: key: m:
0000108 if m ? config || m ? options then
109- let badAttrs = removeAttrs m ["imports" "options" "config" "key" "_file"]; in
110 if badAttrs != {} then
111 throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by assignments to the top-level attributes `config' or `options'."
112 else
···114 key = toString m.key or key;
115 imports = m.imports or [];
116 options = m.options or {};
117- config = m.config or {};
118 }
119 else
120 { file = m._file or file;
121 key = toString m.key or key;
122 imports = m.require or [] ++ m.imports or [];
123 options = {};
124- config = removeAttrs m ["key" "_file" "require" "imports"];
125 };
126127 applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
···503 /* Return a module that causes a warning to be shown if the
504 specified option is defined. For example,
505506- mkRemovedOptionModule [ "boot" "loader" "grub" "bootDevice" ]
507508 causes a warning if the user defines boot.loader.grub.bootDevice.
00000509 */
510- mkRemovedOptionModule = optionName:
511 { options, ... }:
512 { options = setAttrByPath optionName (mkOption {
513 visible = false;
514 });
515 config.warnings =
516 let opt = getAttrFromPath optionName options; in
517- optional opt.isDefined
518- "The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.";
0519 };
520521 /* Return a module that causes a warning to be shown if the
···105 /* Massage a module into canonical form, that is, a set consisting
106 of ‘options’, ‘config’ and ‘imports’ attributes. */
107 unifyModuleSyntax = file: key: m:
108+ let metaSet = if m ? meta
109+ then { meta = m.meta; }
110+ else {};
111+ in
112 if m ? config || m ? options then
113+ let badAttrs = removeAttrs m ["imports" "options" "config" "key" "_file" "meta"]; in
114 if badAttrs != {} then
115 throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by assignments to the top-level attributes `config' or `options'."
116 else
···118 key = toString m.key or key;
119 imports = m.imports or [];
120 options = m.options or {};
121+ config = mkMerge [ (m.config or {}) metaSet ];
122 }
123 else
124 { file = m._file or file;
125 key = toString m.key or key;
126 imports = m.require or [] ++ m.imports or [];
127 options = {};
128+ config = mkMerge [ (removeAttrs m ["key" "_file" "require" "imports"]) metaSet ];
129 };
130131 applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
···507 /* Return a module that causes a warning to be shown if the
508 specified option is defined. For example,
509510+ mkRemovedOptionModule [ "boot" "loader" "grub" "bootDevice" ] "<replacement instructions>"
511512 causes a warning if the user defines boot.loader.grub.bootDevice.
513+514+ replacementInstructions is a string that provides instructions on
515+ how to achieve the same functionality without the removed option,
516+ or alternatively a reasoning why the functionality is not needed.
517+ replacementInstructions SHOULD be provided!
518 */
519+ mkRemovedOptionModule = optionName: replacementInstructions:
520 { options, ... }:
521 { options = setAttrByPath optionName (mkOption {
522 visible = false;
523 });
524 config.warnings =
525 let opt = getAttrFromPath optionName options; in
526+ optional opt.isDefined ''
527+ The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.
528+ ${replacementInstructions}'';
529 };
530531 /* Return a module that causes a warning to be shown if the
···385 the github issue</link>.
386 </para>
387 </listitem>
00000000000000000000000000000000000388</itemizedlist>
389390
···385 the github issue</link>.
386 </para>
387 </listitem>
388+389+ <listitem>
390+ <para>
391+ The <literal>services.xserver.startGnuPGAgent</literal> option has been removed.
392+ GnuPG 2.1.x changed the way the gpg-agent works, and that new approach no
393+ longer requires (or even supports) the "start everything as a child of the
394+ agent" scheme we've implemented in NixOS for older versions.
395+ To configure the gpg-agent for your X session, add the following code to
396+ <filename>~/.bashrc</filename> or some file that’s sourced when your shell is started:
397+ <programlisting>
398+GPG_TTY=$(tty)
399+export GPG_TTY
400+ </programlisting>
401+ If you want to use gpg-agent for SSH, too, add the following to your session
402+ initialization (e.g. <literal>displayManager.sessionCommands</literal>)
403+ <programlisting>
404+gpg-connect-agent /bye
405+unset SSH_AGENT_PID
406+export SSH_AUTH_SOCK="''${HOME}/.gnupg/S.gpg-agent.ssh"
407+ </programlisting>
408+ and make sure that
409+ <programlisting>
410+enable-ssh-support
411+ </programlisting>
412+ is included in your <filename>~/.gnupg/gpg-agent.conf</filename>.
413+ You will need to use <command>ssh-add</command> to re-add your ssh keys.
414+ If gpg’s automatic transformation of the private keys to the new format fails,
415+ you will need to re-import your private keyring as well:
416+ <programlisting>
417+gpg --import ~/.gnupg/secring.gpg
418+ </programlisting>
419+ The <command>gpg-agent(1)</command> man page has more details about this subject,
420+ i.e. in the "EXAMPLES" section.
421+ </para>
422+ </listitem>
423</itemizedlist>
424425
···39 default = [];
40 example = [ lib.maintainers.all ];
41 description = ''
42- List of maintainers of each module. This option should be defined at
43 most once per module.
44 '';
45 };
···49 internal = true;
50 example = "./meta.xml";
51 description = ''
52- Documentation prologe for the set of options of each module. This
53 option should be defined at most once per module.
54 '';
55 };
···57 };
58 };
5960- config = {
61- meta.maintainers = singleton lib.maintainers.pierron;
62- };
63}
···39 default = [];
40 example = [ lib.maintainers.all ];
41 description = ''
42+ List of maintainers of each module. This option should be defined at
43 most once per module.
44 '';
45 };
···49 internal = true;
50 example = "./meta.xml";
51 description = ''
52+ Documentation prologe for the set of options of each module. This
53 option should be defined at most once per module.
54 '';
55 };
···57 };
58 };
5960+ meta.maintainers = singleton lib.maintainers.pierron;
0061}
···17 Caveat: even if the package is reached by a different means,
18 the path above will be shown and not e.g. `${config.services.foo.package}`. */
19 manual = import ../../../doc/manual {
20- inherit pkgs;
21 version = config.system.nixosRelease;
22 revision = "release-${config.system.nixosRelease}";
23 options =
···17 Caveat: even if the package is reached by a different means,
18 the path above will be shown and not e.g. `${config.services.foo.package}`. */
19 manual = import ../../../doc/manual {
20+ inherit pkgs config;
21 version = config.system.nixosRelease;
22 revision = "release-${config.system.nixosRelease}";
23 options =
···306 };
307308 imports = [
309+ (mkRemovedOptionModule [ "services" "xserver" "displayManager" "desktopManagerHandlesLidAndPower" ]
310+ "The option is no longer necessary because all display managers have already delegated lid management to systemd.")
311 ];
312313}
···18 # revision/hash as well. See
19 # http://download.virtualbox.org/virtualbox/${version}/SHA256SUMS
20 # for hashes.
21- version = "5.0.20";
2223 forEachModule = action: ''
24 for mod in \
···39 '';
4041 # See https://github.com/NixOS/nixpkgs/issues/672 for details
42- extpackRevision = "106931";
43 extensionPack = requireFile rec {
44 name = "Oracle_VM_VirtualBox_Extension_Pack-${version}-${extpackRevision}.vbox-extpack";
45 # IMPORTANT: Hash must be base16 encoded because it's used as an input to
46 # VBoxExtPackHelperApp!
47- sha256 = "11f40842a56ebb17da1bbc82a21543e66108a5330ebd54ded68038a990aa071b";
48 message = ''
49 In order to use the extension pack, you need to comply with the VirtualBox Personal Use
50 and Evaluation License (PUEL) available at:
···6364 src = fetchurl {
65 url = "http://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2";
66- sha256 = "0asc5n9an2dzvrd4isjz3vac2h0sm6dbzvrc36hn8ag2ma3hg75g";
67 };
6869 buildInputs =
···99 set +x
100 '';
101102- patches = optional enableHardening ./hardened.patch
103- ++ [
104- (fetchurl rec {
105- name = "fix-detect-gcc-5.4.patch";
106- url = "https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=827193;filename=${name};msg=5";
107- sha256 = "0y6v5dc6fqj9iv27cl8q2g87v1kxg19129mpas4vjg7g0529v4g9";
108- })
109- ];
110111 postPatch = ''
112 sed -i -e 's|/sbin/ifconfig|${nettools}/bin/ifconfig|' \
···18 # revision/hash as well. See
19 # http://download.virtualbox.org/virtualbox/${version}/SHA256SUMS
20 # for hashes.
21+ version = "5.0.26";
2223 forEachModule = action: ''
24 for mod in \
···39 '';
4041 # See https://github.com/NixOS/nixpkgs/issues/672 for details
42+ extpackRevision = "108824";
43 extensionPack = requireFile rec {
44 name = "Oracle_VM_VirtualBox_Extension_Pack-${version}-${extpackRevision}.vbox-extpack";
45 # IMPORTANT: Hash must be base16 encoded because it's used as an input to
46 # VBoxExtPackHelperApp!
47+ sha256 = "2f2302c7ba3d00a1258fe8e7767a6eb08dccdc3c31f6e3eeb74063c2c268b104";
48 message = ''
49 In order to use the extension pack, you need to comply with the VirtualBox Personal Use
50 and Evaluation License (PUEL) available at:
···6364 src = fetchurl {
65 url = "http://download.virtualbox.org/virtualbox/${version}/VirtualBox-${version}.tar.bz2";
66+ sha256 = "78dec1369d2c8feefea3c682d95e76c0e99414c56626388035cf4061d4dad62e";
67 };
6869 buildInputs =
···99 set +x
100 '';
101102+ patches = optional enableHardening ./hardened.patch;
0000000103104 postPatch = ''
105 sed -i -e 's|/sbin/ifconfig|${nettools}/bin/ifconfig|' \