lol

nixos/display-managers/auto: remove

This module allows root autoLogin, so we would break that for users, but
they shouldn't be using it anyways. This gives the impression like auto
is some special display manager, when it's just lightdm and special pam
rules to allow root autoLogin. It was created for NixOS's testing
so I believe this is where it belongs.

+78 -24
+6 -3
nixos/doc/manual/configuration/x-windows.xml
··· 85 85 <programlisting> 86 86 <xref linkend="opt-services.xserver.displayManager.defaultSession"/> = "none+i3"; 87 87 </programlisting> 88 - And, finally, to enable auto-login for a user <literal>johndoe</literal>: 88 + Every display manager in NixOS supports auto-login, here is an example 89 + using lightdm for a user <literal>alice</literal>: 89 90 <programlisting> 90 - <xref linkend="opt-services.xserver.displayManager.auto.enable"/> = true; 91 - <xref linkend="opt-services.xserver.displayManager.auto.user"/> = "johndoe"; 91 + <xref linkend="opt-services.xserver.displayManager.lightdm.enable"/> = true; 92 + <xref linkend="opt-services.xserver.displayManager.lightdm.autoLogin.enable"/> = true; 93 + <xref linkend="opt-services.xserver.displayManager.lightdm.autoLogin.user"/> = "alice"; 92 94 </programlisting> 95 + The options are named identically for all other display managers. 93 96 </para> 94 97 </simplesect> 95 98 <simplesect xml:id="sec-x11-graphics-cards-nvidia">
+33
nixos/doc/manual/release-notes/rl-2003.xml
··· 457 457 The <literal>gcc5</literal> and <literal>gfortran5</literal> packages have been removed. 458 458 </para> 459 459 </listitem> 460 + <listitem> 461 + <para> 462 + The <option>services.xserver.displayManager.auto</option> module has been removed. 463 + It was only intended for use in internal NixOS tests, and gave the false impression 464 + of it being a special display manager when it's actually LightDM. 465 + Please use the <xref linkend="opt-services.xserver.displayManager.lightdm.autoLogin"/> options instead, 466 + or any other display manager in NixOS as they all support auto-login. If you used this module specifically 467 + because it permitted root auto-login you can override the lightdm-autologin pam module like: 468 + <programlisting> 469 + <link xlink:href="#opt-security.pam.services._name__.text">security.pam.services.lightdm-autologin.text</link> = lib.mkForce '' 470 + auth requisite pam_nologin.so 471 + auth required pam_succeed_if.so quiet 472 + auth required pam_permit.so 473 + 474 + account include lightdm 475 + 476 + password include lightdm 477 + 478 + session include lightdm 479 + ''; 480 + </programlisting> 481 + The difference is the: 482 + <programlisting> 483 + auth required pam_succeed_if.so quiet 484 + </programlisting> 485 + line, where default it's: 486 + <programlisting> 487 + auth required pam_succeed_if.so uid >= 1000 quiet 488 + </programlisting> 489 + not permitting users with uid's below 1000 (like root). 490 + All other display managers in NixOS are configured like this. 491 + </para> 492 + </listitem> 460 493 </itemizedlist> 461 494 </section> 462 495
-1
nixos/modules/module-list.nix
··· 865 865 ./services/x11/unclutter.nix 866 866 ./services/x11/unclutter-xfixes.nix 867 867 ./services/x11/desktop-managers/default.nix 868 - ./services/x11/display-managers/auto.nix 869 868 ./services/x11/display-managers/default.nix 870 869 ./services/x11/display-managers/gdm.nix 871 870 ./services/x11/display-managers/lightdm.nix
+7
nixos/modules/rename.nix
··· 34 34 as the underlying package isn't being maintained. Working alternatives are 35 35 libinput and synaptics. 36 36 '') 37 + (mkRemovedOptionModule [ "services" "xserver" "displayManager" "auto" ] '' 38 + The services.xserver.displayManager.auto module has been removed 39 + because it was only intended for use in internal NixOS tests, and gave the 40 + false impression of it being a special display manager when it's actually 41 + LightDM. Please use the services.xserver.displayManager.lightdm.autoLogin options 42 + instead, or any other display manager in NixOS as they all support auto-login. 43 + '') 37 44 38 45 # Do NOT add any option renames here, see top of the file 39 46 ];
+2 -2
nixos/modules/services/x11/display-managers/auto.nix nixos/tests/common/auto.nix
··· 5 5 let 6 6 7 7 dmcfg = config.services.xserver.displayManager; 8 - cfg = dmcfg.auto; 8 + cfg = config.test-support.displayManager.auto; 9 9 10 10 in 11 11 ··· 15 15 16 16 options = { 17 17 18 - services.xserver.displayManager.auto = { 18 + test-support.displayManager.auto = { 19 19 20 20 enable = mkOption { 21 21 default = false;
+1 -2
nixos/modules/services/x11/xserver.nix
··· 556 556 557 557 services.xserver.displayManager.lightdm.enable = 558 558 let dmconf = cfg.displayManager; 559 - default = !( dmconf.auto.enable 560 - || dmconf.gdm.enable 559 + default = !(dmconf.gdm.enable 561 560 || dmconf.sddm.enable 562 561 || dmconf.xpra.enable ); 563 562 in mkIf (default) true;
+1 -1
nixos/tests/chromium.nix
··· 23 23 24 24 machine.imports = [ ./common/user-account.nix ./common/x11.nix ]; 25 25 machine.virtualisation.memorySize = 2047; 26 - machine.services.xserver.displayManager.auto.user = "alice"; 26 + machine.test-support.displayManager.auto.user = "alice"; 27 27 machine.environment.systemPackages = [ chromiumPkg ]; 28 28 29 29 startupHTML = pkgs.writeText "chromium-startup.html" ''
+7 -2
nixos/tests/common/x11.nix
··· 1 1 { lib, ... }: 2 2 3 - { services.xserver.enable = true; 3 + { 4 + imports = [ 5 + ./auto.nix 6 + ]; 7 + 8 + services.xserver.enable = true; 4 9 5 10 # Automatically log in. 6 - services.xserver.displayManager.auto.enable = true; 11 + test-support.displayManager.auto.enable = true; 7 12 8 13 # Use IceWM as the window manager. 9 14 # Don't use a desktop manager.
+1 -1
nixos/tests/i3wm.nix
··· 6 6 7 7 machine = { lib, ... }: { 8 8 imports = [ ./common/x11.nix ./common/user-account.nix ]; 9 - services.xserver.displayManager.auto.user = "alice"; 9 + test-support.displayManager.auto.user = "alice"; 10 10 services.xserver.displayManager.defaultSession = lib.mkForce "none+i3"; 11 11 services.xserver.windowManager.i3.enable = true; 12 12 };
+1 -1
nixos/tests/signal-desktop.nix
··· 15 15 ]; 16 16 17 17 services.xserver.enable = true; 18 - services.xserver.displayManager.auto.user = "alice"; 18 + test-support.displayManager.auto.user = "alice"; 19 19 environment.systemPackages = [ pkgs.signal-desktop ]; 20 20 }; 21 21
+1 -1
nixos/tests/systemd.nix
··· 19 19 systemd.extraConfig = "DefaultEnvironment=\"XXX_SYSTEM=foo\""; 20 20 systemd.user.extraConfig = "DefaultEnvironment=\"XXX_USER=bar\""; 21 21 services.journald.extraConfig = "Storage=volatile"; 22 - services.xserver.displayManager.auto.user = "alice"; 22 + test-support.displayManager.auto.user = "alice"; 23 23 24 24 systemd.shutdown.test = pkgs.writeScript "test.shutdown" '' 25 25 #!${pkgs.stdenv.shell}
+1 -1
nixos/tests/virtualbox.nix
··· 356 356 virtualisation.qemu.options = 357 357 if useKvmNestedVirt then ["-cpu" "kvm64,vmx=on"] else []; 358 358 virtualisation.virtualbox.host.enable = true; 359 - services.xserver.displayManager.auto.user = "alice"; 359 + test-support.displayManager.auto.user = "alice"; 360 360 users.users.alice.extraGroups = let 361 361 inherit (config.virtualisation.virtualbox.host) enableHardening; 362 362 in lib.mkIf enableHardening (lib.singleton "vboxusers");
+1 -1
nixos/tests/xautolock.nix
··· 9 9 nodes.machine = { 10 10 imports = [ ./common/x11.nix ./common/user-account.nix ]; 11 11 12 - services.xserver.displayManager.auto.user = "bob"; 12 + test-support.displayManager.auto.user = "bob"; 13 13 services.xserver.xautolock.enable = true; 14 14 services.xserver.xautolock.time = 1; 15 15 };
+11 -3
nixos/tests/xfce.nix
··· 4 4 machine = 5 5 { pkgs, ... }: 6 6 7 - { imports = [ ./common/user-account.nix ]; 7 + { 8 + imports = [ 9 + ./common/user-account.nix 10 + ]; 8 11 9 12 services.xserver.enable = true; 10 13 11 - services.xserver.displayManager.auto.enable = true; 12 - services.xserver.displayManager.auto.user = "alice"; 14 + services.xserver.displayManager.lightdm = { 15 + enable = true; 16 + autoLogin = { 17 + enable = true; 18 + user = "alice"; 19 + }; 20 + }; 13 21 14 22 services.xserver.desktopManager.xfce.enable = true; 15 23
+1 -1
nixos/tests/xmonad.nix
··· 6 6 7 7 machine = { pkgs, ... }: { 8 8 imports = [ ./common/x11.nix ./common/user-account.nix ]; 9 - services.xserver.displayManager.auto.user = "alice"; 9 + test-support.displayManager.auto.user = "alice"; 10 10 services.xserver.displayManager.defaultSession = "none+xmonad"; 11 11 services.xserver.windowManager.xmonad = { 12 12 enable = true;
+1 -1
nixos/tests/xrdp.nix
··· 14 14 15 15 client = { pkgs, ... }: { 16 16 imports = [ ./common/x11.nix ./common/user-account.nix ]; 17 - services.xserver.displayManager.auto.user = "alice"; 17 + test-support.displayManager.auto.user = "alice"; 18 18 environment.systemPackages = [ pkgs.freerdp ]; 19 19 services.xrdp.enable = true; 20 20 services.xrdp.defaultWindowManager = "${pkgs.icewm}/bin/icewm";
+2 -2
nixos/tests/xss-lock.nix
··· 10 10 simple = { 11 11 imports = [ ./common/x11.nix ./common/user-account.nix ]; 12 12 programs.xss-lock.enable = true; 13 - services.xserver.displayManager.auto.user = "alice"; 13 + test-support.displayManager.auto.user = "alice"; 14 14 }; 15 15 16 16 custom_lockcmd = { pkgs, ... }: { 17 17 imports = [ ./common/x11.nix ./common/user-account.nix ]; 18 - services.xserver.displayManager.auto.user = "alice"; 18 + test-support.displayManager.auto.user = "alice"; 19 19 20 20 programs.xss-lock = { 21 21 enable = true;
+1 -1
nixos/tests/yabar.nix
··· 11 11 machine = { 12 12 imports = [ ./common/x11.nix ./common/user-account.nix ]; 13 13 14 - services.xserver.displayManager.auto.user = "bob"; 14 + test-support.displayManager.auto.user = "bob"; 15 15 16 16 programs.yabar.enable = true; 17 17 programs.yabar.bars = {