···503503 /* Return a module that causes a warning to be shown if the
504504 specified option is defined. For example,
505505506506- mkRemovedOptionModule [ "boot" "loader" "grub" "bootDevice" ]
506506+ mkRemovedOptionModule [ "boot" "loader" "grub" "bootDevice" ] "<replacement instructions>"
507507508508 causes a warning if the user defines boot.loader.grub.bootDevice.
509509+510510+ replacementInstructions is a string that provides instructions on
511511+ how to achieve the same functionality without the removed option,
512512+ or alternatively a reasoning why the functionality is not needed.
513513+ replacementInstructions SHOULD be provided!
509514 */
510510- mkRemovedOptionModule = optionName:
515515+ mkRemovedOptionModule = optionName: replacementInstructions:
511516 { options, ... }:
512517 { options = setAttrByPath optionName (mkOption {
513518 visible = false;
514519 });
515520 config.warnings =
516521 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.";
522522+ optional opt.isDefined ''
523523+ The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.
524524+ ${replacementInstructions}'';
519525 };
520526521527 /* Return a module that causes a warning to be shown if the
+35
nixos/doc/manual/release-notes/rl-1603.xml
···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