···105105 /* Massage a module into canonical form, that is, a set consisting
106106 of ‘options’, ‘config’ and ‘imports’ attributes. */
107107 unifyModuleSyntax = file: key: m:
108108+ let metaSet = if m ? meta
109109+ then { meta = m.meta; }
110110+ else {};
111111+ in
108112 if m ? config || m ? options then
109109- let badAttrs = removeAttrs m ["imports" "options" "config" "key" "_file"]; in
113113+ let badAttrs = removeAttrs m ["imports" "options" "config" "key" "_file" "meta"]; in
110114 if badAttrs != {} then
111115 throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by assignments to the top-level attributes `config' or `options'."
112116 else
···114118 key = toString m.key or key;
115119 imports = m.imports or [];
116120 options = m.options or {};
117117- config = m.config or {};
121121+ config = mkMerge [ (m.config or {}) metaSet ];
118122 }
119123 else
120124 { file = m._file or file;
121125 key = toString m.key or key;
122126 imports = m.require or [] ++ m.imports or [];
123127 options = {};
124124- config = removeAttrs m ["key" "_file" "require" "imports"];
128128+ config = mkMerge [ (removeAttrs m ["key" "_file" "require" "imports"]) metaSet ];
125129 };
126130127131 applyIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then
···503507 /* Return a module that causes a warning to be shown if the
504508 specified option is defined. For example,
505509506506- mkRemovedOptionModule [ "boot" "loader" "grub" "bootDevice" ]
510510+ mkRemovedOptionModule [ "boot" "loader" "grub" "bootDevice" ] "<replacement instructions>"
507511508512 causes a warning if the user defines boot.loader.grub.bootDevice.
513513+514514+ replacementInstructions is a string that provides instructions on
515515+ how to achieve the same functionality without the removed option,
516516+ or alternatively a reasoning why the functionality is not needed.
517517+ replacementInstructions SHOULD be provided!
509518 */
510510- mkRemovedOptionModule = optionName:
519519+ mkRemovedOptionModule = optionName: replacementInstructions:
511520 { options, ... }:
512521 { options = setAttrByPath optionName (mkOption {
513522 visible = false;
514523 });
515524 config.warnings =
516525 let opt = getAttrFromPath optionName options; in
517517- optional opt.isDefined
518518- "The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.";
526526+ optional opt.isDefined ''
527527+ The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.
528528+ ${replacementInstructions}'';
519529 };
520530521531 /* Return a module that causes a warning to be shown if the
···385385 the github issue</link>.
386386 </para>
387387 </listitem>
388388+389389+ <listitem>
390390+ <para>
391391+ The <literal>services.xserver.startGnuPGAgent</literal> option has been removed.
392392+ GnuPG 2.1.x changed the way the gpg-agent works, and that new approach no
393393+ longer requires (or even supports) the "start everything as a child of the
394394+ agent" scheme we've implemented in NixOS for older versions.
395395+ To configure the gpg-agent for your X session, add the following code to
396396+ <filename>~/.bashrc</filename> or some file that’s sourced when your shell is started:
397397+ <programlisting>
398398+GPG_TTY=$(tty)
399399+export GPG_TTY
400400+ </programlisting>
401401+ If you want to use gpg-agent for SSH, too, add the following to your session
402402+ initialization (e.g. <literal>displayManager.sessionCommands</literal>)
403403+ <programlisting>
404404+gpg-connect-agent /bye
405405+unset SSH_AGENT_PID
406406+export SSH_AUTH_SOCK="''${HOME}/.gnupg/S.gpg-agent.ssh"
407407+ </programlisting>
408408+ and make sure that
409409+ <programlisting>
410410+enable-ssh-support
411411+ </programlisting>
412412+ is included in your <filename>~/.gnupg/gpg-agent.conf</filename>.
413413+ You will need to use <command>ssh-add</command> to re-add your ssh keys.
414414+ If gpg’s automatic transformation of the private keys to the new format fails,
415415+ you will need to re-import your private keyring as well:
416416+ <programlisting>
417417+gpg --import ~/.gnupg/secring.gpg
418418+ </programlisting>
419419+ The <command>gpg-agent(1)</command> man page has more details about this subject,
420420+ i.e. in the "EXAMPLES" section.
421421+ </para>
422422+ </listitem>
388423</itemizedlist>
389424390425
···3939 default = [];
4040 example = [ lib.maintainers.all ];
4141 description = ''
4242- List of maintainers of each module. This option should be defined at
4242+ List of maintainers of each module. This option should be defined at
4343 most once per module.
4444 '';
4545 };
···4949 internal = true;
5050 example = "./meta.xml";
5151 description = ''
5252- Documentation prologe for the set of options of each module. This
5252+ Documentation prologe for the set of options of each module. This
5353 option should be defined at most once per module.
5454 '';
5555 };
···5757 };
5858 };
59596060- config = {
6161- meta.maintainers = singleton lib.maintainers.pierron;
6262- };
6060+ meta.maintainers = singleton lib.maintainers.pierron;
6361}
···1717 Caveat: even if the package is reached by a different means,
1818 the path above will be shown and not e.g. `${config.services.foo.package}`. */
1919 manual = import ../../../doc/manual {
2020- inherit pkgs;
2020+ inherit pkgs config;
2121 version = config.system.nixosRelease;
2222 revision = "release-${config.system.nixosRelease}";
2323 options =