···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
···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" ] "<replacement instructions>"
507508 causes a warning if the user defines boot.loader.grub.bootDevice.
509+510+ replacementInstructions is a string that provides instructions on
511+ how to achieve the same functionality without the removed option,
512+ or alternatively a reasoning why the functionality is not needed.
513+ replacementInstructions SHOULD be provided!
514 */
515+ mkRemovedOptionModule = optionName: replacementInstructions:
516 { options, ... }:
517 { options = setAttrByPath optionName (mkOption {
518 visible = false;
519 });
520 config.warnings =
521 let opt = getAttrFromPath optionName options; in
522+ optional opt.isDefined ''
523+ The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.
524+ ${replacementInstructions}'';
525 };
526527 /* Return a module that causes a warning to be shown if the
+35
nixos/doc/manual/release-notes/rl-1603.xml
···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
···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}