Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 50bf24bac4f4
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 33b5621ef664
Choose a head ref
  • 12 commits
  • 26 files changed
  • 9 contributors

Commits on Jul 8, 2020

  1. spaceship-prompt: enable on darwin

    This commit enable spaceship-prompt to be used on darwin machines.
    KyleOndy committed Jul 8, 2020
    Copy the full SHA
    b1792aa View commit details

Commits on Jul 9, 2020

  1. Copy the full SHA
    6673716 View commit details
  2. fix pkgsCross.*.texinfoInteractive

    This fixes #86166 to build cross compilied texinfoInteractive.
    BUILD_CC has been renamed to CC_FOR_BUILD so the patch needs to applied
    this renaming.
    
    tested on: pkgsCross.armv7l-hf-multiplatform.texinfoInteractive
    dguibert committed Jul 9, 2020
    Copy the full SHA
    a2eb391 View commit details

Commits on Jul 10, 2020

  1. nixos/displayManager: make autoLogin options independent of DM type

    Co-authored-by: volth <volth@volth.com>
    worldofpeace and volth committed Jul 10, 2020
    Copy the full SHA
    490cd78 View commit details
  2. gnome3.four-in-a-row: 3.36.3 -> 3.36.4

    r-ryantm authored and jtojnar committed Jul 10, 2020
    Copy the full SHA
    8581bbf View commit details
  3. gnome3.gnome-notes: 3.36.1 -> 3.36.2

    r-ryantm authored and jtojnar committed Jul 10, 2020
    Copy the full SHA
    615029c View commit details
  4. Merge pull request #85065 from worldofpeace/autologin-unified

    nixos/displayManager: make autoLogin options independent of DM type
    worldofpeace authored Jul 10, 2020
    Copy the full SHA
    747fb48 View commit details
  5. Merge pull request #92692 from c0deaddict/fix/docker-layer-created-now

    dockerTools.buildLayeredImage: fix created=now
    marsam authored Jul 10, 2020
    Copy the full SHA
    926e93b View commit details
  6. Merge pull request #92718 from KyleOndy/enable-spaceship-prompt-on-da…

    …rwin
    
    spaceship-prompt: enable on darwin
    marsam authored Jul 10, 2020
    Copy the full SHA
    4b3ee09 View commit details
  7. Copy the full SHA
    f6e07b3 View commit details
  8. Copy the full SHA
    b92c2c6 View commit details
  9. Copy the full SHA
    33b5621 View commit details
3 changes: 1 addition & 2 deletions nixos/doc/manual/configuration/profiles/demo.xml
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@
This profile just enables a <systemitem class="username">demo</systemitem>
user, with password <literal>demo</literal>, uid <literal>1000</literal>,
<systemitem class="groupname">wheel</systemitem> group and
<link linkend="opt-services.xserver.displayManager.sddm.autoLogin"> autologin
in the SDDM display manager</link>.
<link linkend="opt-services.xserver.displayManager.autoLogin">autologin in the SDDM display manager</link>.
</para>
</section>
5 changes: 2 additions & 3 deletions nixos/doc/manual/configuration/x-windows.xml
Original file line number Diff line number Diff line change
@@ -90,10 +90,9 @@
using lightdm for a user <literal>alice</literal>:
<programlisting>
<xref linkend="opt-services.xserver.displayManager.lightdm.enable"/> = true;
<xref linkend="opt-services.xserver.displayManager.lightdm.autoLogin.enable"/> = true;
<xref linkend="opt-services.xserver.displayManager.lightdm.autoLogin.user"/> = "alice";
<xref linkend="opt-services.xserver.displayManager.autoLogin.enable"/> = true;
<xref linkend="opt-services.xserver.displayManager.autoLogin.user"/> = "alice";
</programlisting>
The options are named identically for all other display managers.
</para>
</simplesect>
<simplesect xml:id="sec-x11--graphics-cards-intel">
2 changes: 1 addition & 1 deletion nixos/doc/manual/release-notes/rl-2003.xml
Original file line number Diff line number Diff line change
@@ -792,7 +792,7 @@ users.users.me =
The <option>services.xserver.displayManager.auto</option> module has been removed.
It was only intended for use in internal NixOS tests, and gave the false impression
of it being a special display manager when it's actually LightDM.
Please use the <xref linkend="opt-services.xserver.displayManager.lightdm.autoLogin"/> options instead,
Please use the <option>services.xserver.displayManager.lightdm.autoLogin</option> options instead,
or any other display manager in NixOS as they all support auto-login. If you used this module specifically
because it permitted root auto-login you can override the lightdm-autologin pam module like:
<programlisting>
6 changes: 6 additions & 0 deletions nixos/doc/manual/release-notes/rl-2009.xml
Original file line number Diff line number Diff line change
@@ -519,6 +519,12 @@ systemd.services.nginx.serviceConfig.ReadWritePaths = [ "/var/www" ];
automatically if <literal>stateVersion</literal> is 20.09 or higher.
</para>
</listitem>
<listitem>
<para>
We now have a unified <xref linkend="opt-services.xserver.displayManager.autoLogin"/> option interface
to be used for every display-manager in NixOS.
</para>
</listitem>
</itemizedlist>
</section>

20 changes: 11 additions & 9 deletions nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix
Original file line number Diff line number Diff line change
@@ -11,15 +11,17 @@ with lib;

services.xserver.desktopManager.gnome3.enable = true;

services.xserver.displayManager.gdm = {
enable = true;
# autoSuspend makes the machine automatically suspend after inactivity.
# It's possible someone could/try to ssh'd into the machine and obviously
# have issues because it's inactive.
# See:
# * https://github.com/NixOS/nixpkgs/pull/63790
# * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22
autoSuspend = false;
services.xserver.displayManager = {
gdm = {
enable = true;
# autoSuspend makes the machine automatically suspend after inactivity.
# It's possible someone could/try to ssh'd into the machine and obviously
# have issues because it's inactive.
# See:
# * https://github.com/NixOS/nixpkgs/pull/63790
# * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22
autoSuspend = false;
};
autoLogin = {
enable = true;
user = "nixos";
Original file line number Diff line number Diff line change
@@ -16,8 +16,8 @@ with lib;
};

# Automatically login as nixos.
displayManager.sddm = {
enable = true;
displayManager = {
sddm.enable = true;
autoLogin = {
enable = true;
user = "nixos";
10 changes: 6 additions & 4 deletions nixos/modules/profiles/demo.nix
Original file line number Diff line number Diff line change
@@ -11,9 +11,11 @@
uid = 1000;
};

services.xserver.displayManager.sddm.autoLogin = {
enable = true;
relogin = true;
user = "demo";
services.xserver.displayManager = {
autoLogin = {
enable = true;
user = "demo";
};
sddm.autoLogin.relogin = true;
};
}
2 changes: 1 addition & 1 deletion nixos/modules/rename.nix
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ with lib;
The services.xserver.displayManager.auto module has been removed
because it was only intended for use in internal NixOS tests, and gave the
false impression of it being a special display manager when it's actually
LightDM. Please use the services.xserver.displayManager.lightdm.autoLogin options
LightDM. Please use the services.xserver.displayManager.autoLogin options
instead, or any other display manager in NixOS as they all support auto-login.
'')
(mkRemovedOptionModule [ "services" "dnscrypt-proxy" ] "Use services.dnscrypt-proxy2 instead")
33 changes: 33 additions & 0 deletions nixos/modules/services/x11/display-managers/default.nix
Original file line number Diff line number Diff line change
@@ -332,12 +332,45 @@ in

};

# Configuration for automatic login. Common for all DM.
autoLogin = mkOption {
type = types.submodule {
options = {
enable = mkOption {
type = types.bool;
default = cfg.displayManager.autoLogin.user != null;
description = ''
Automatically log in as <option>autoLogin.user</option>.
'';
};

user = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
User to be used for the automatic login.
'';
};
};
};

default = {};
description = ''
Auto login configuration attrset.
'';
};

};

};

config = {
assertions = [
{ assertion = cfg.displayManager.autoLogin.enable -> cfg.displayManager.autoLogin.user != null;
message = ''
services.xserver.displayManager.autoLogin.enable requires services.xserver.displayManager.autoLogin.user to be set
'';
}
{
assertion = cfg.desktopManager.default != null || cfg.windowManager.default != null -> cfg.displayManager.defaultSession == defaultSessionFromLegacyOptions;
message = "You cannot use both services.xserver.displayManager.defaultSession option and legacy options (services.xserver.desktopManager.default and services.xserver.windowManager.default).";
65 changes: 24 additions & 41 deletions nixos/modules/services/x11/display-managers/gdm.nix
Original file line number Diff line number Diff line change
@@ -37,6 +37,22 @@ let
in

{
imports = [
(mkRenamedOptionModule [ "services" "xserver" "displayManager" "gdm" "autoLogin" "enable" ] [
"services"
"xserver"
"displayManager"
"autoLogin"
"enable"
])
(mkRenamedOptionModule [ "services" "xserver" "displayManager" "gdm" "autoLogin" "user" ] [
"services"
"xserver"
"displayManager"
"autoLogin"
"user"
])
];

meta = {
maintainers = teams.gnome.members;
@@ -56,40 +72,13 @@ in
debugging messages in GDM
'';

autoLogin = mkOption {
default = {};
# Auto login options specific to GDM
autoLogin.delay = mkOption {
type = types.int;
default = 0;
description = ''
Auto login configuration attrset.
Seconds of inactivity after which the autologin will be performed.
'';

type = types.submodule {
options = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Automatically log in as the sepecified <option>autoLogin.user</option>.
'';
};

user = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
User to be used for the autologin.
'';
};

delay = mkOption {
type = types.int;
default = 0;
description = ''
Seconds of inactivity after which the autologin will be performed.
'';
};

};
};
};

wayland = mkOption {
@@ -128,12 +117,6 @@ in

config = mkIf cfg.gdm.enable {

assertions = [
{ assertion = cfg.gdm.autoLogin.enable -> cfg.gdm.autoLogin.user != null;
message = "GDM auto-login requires services.xserver.displayManager.gdm.autoLogin.user to be set";
}
];

services.xserver.displayManager.lightdm.enable = false;

users.users.gdm =
@@ -287,14 +270,14 @@ in
environment.etc."gdm/custom.conf".text = ''
[daemon]
WaylandEnable=${if cfg.gdm.wayland then "true" else "false"}
${optionalString cfg.gdm.autoLogin.enable (
${optionalString cfg.autoLogin.enable (
if cfg.gdm.autoLogin.delay > 0 then ''
TimedLoginEnable=true
TimedLogin=${cfg.gdm.autoLogin.user}
TimedLogin=${cfg.autoLogin.user}
TimedLoginDelay=${toString cfg.gdm.autoLogin.delay}
'' else ''
AutomaticLoginEnable=true
AutomaticLogin=${cfg.gdm.autoLogin.user}
AutomaticLogin=${cfg.autoLogin.user}
'')
}
65 changes: 24 additions & 41 deletions nixos/modules/services/x11/display-managers/lightdm.nix
Original file line number Diff line number Diff line change
@@ -53,8 +53,8 @@ let
${optionalString cfg.greeter.enable ''
greeter-session = ${cfg.greeter.name}
''}
${optionalString cfg.autoLogin.enable ''
autologin-user = ${cfg.autoLogin.user}
${optionalString dmcfg.autoLogin.enable ''
autologin-user = ${dmcfg.autoLogin.user}
autologin-user-timeout = ${toString cfg.autoLogin.timeout}
autologin-session = ${sessionData.autologinSession}
''}
@@ -82,6 +82,20 @@ in
./lightdm-greeters/enso-os.nix
./lightdm-greeters/pantheon.nix
./lightdm-greeters/tiny.nix
(mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "enable" ] [
"services"
"xserver"
"displayManager"
"autoLogin"
"enable"
])
(mkRenamedOptionModule [ "services" "xserver" "displayManager" "lightdm" "autoLogin" "user" ] [
"services"
"xserver"
"displayManager"
"autoLogin"
"user"
])
];

options = {
@@ -149,39 +163,13 @@ in
description = "Extra lines to append to SeatDefaults section.";
};

autoLogin = mkOption {
default = {};
# Configuration for automatic login specific to LightDM
autoLogin.timeout = mkOption {
type = types.int;
default = 0;
description = ''
Configuration for automatic login.
Show the greeter for this many seconds before automatic login occurs.
'';

type = types.submodule {
options = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Automatically log in as the specified <option>autoLogin.user</option>.
'';
};

user = mkOption {
type = types.nullOr types.str;
default = null;
description = ''
User to be used for the automatic login.
'';
};

timeout = mkOption {
type = types.int;
default = 0;
description = ''
Show the greeter for this many seconds before automatic login occurs.
'';
};
};
};
};

};
@@ -195,17 +183,12 @@ in
LightDM requires services.xserver.enable to be true
'';
}
{ assertion = cfg.autoLogin.enable -> cfg.autoLogin.user != null;
message = ''
LightDM auto-login requires services.xserver.displayManager.lightdm.autoLogin.user to be set
'';
}
{ assertion = cfg.autoLogin.enable -> sessionData.autologinSession != null;
{ assertion = dmcfg.autoLogin.enable -> sessionData.autologinSession != null;
message = ''
LightDM auto-login requires that services.xserver.displayManager.defaultSession is set.
'';
}
{ assertion = !cfg.greeter.enable -> (cfg.autoLogin.enable && cfg.autoLogin.timeout == 0);
{ assertion = !cfg.greeter.enable -> (dmcfg.autoLogin.enable && cfg.autoLogin.timeout == 0);
message = ''
LightDM can only run without greeter if automatic login is enabled and the timeout for it
is set to zero.
@@ -218,7 +201,7 @@ in

# Set default session in session chooser to a specified values – basically ignore session history.
# Auto-login is already covered by a config value.
services.xserver.displayManager.job.preStart = optionalString (!cfg.autoLogin.enable && dmcfg.defaultSession != null) ''
services.xserver.displayManager.job.preStart = optionalString (!dmcfg.autoLogin.enable && dmcfg.defaultSession != null) ''
${setSessionScript}/bin/set-session ${dmcfg.defaultSession}
'';

Loading