summary refs log tree commit diff
path: root/nixos/modules/services/x11
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@protonmail.ch>2019-10-09 21:22:19 +0000
committerGitHub <noreply@github.com>2019-10-09 21:22:19 +0000
commit1169336cd9aa65e31ca705b44ffafe297d9c2084 (patch)
tree8107b23b9300f7a7b205c79d1d2a27156a3478f0 /nixos/modules/services/x11
parent0e751e66552297cd3db2ef6a9f2f6241492c12d0 (diff)
parent67ac11e0727f76a870ed8bd06e08e26af02c2ee1 (diff)
downloadnixpkgs-1169336cd9aa65e31ca705b44ffafe297d9c2084.tar
nixpkgs-1169336cd9aa65e31ca705b44ffafe297d9c2084.tar.gz
nixpkgs-1169336cd9aa65e31ca705b44ffafe297d9c2084.tar.bz2
nixpkgs-1169336cd9aa65e31ca705b44ffafe297d9c2084.tar.lz
nixpkgs-1169336cd9aa65e31ca705b44ffafe297d9c2084.tar.xz
nixpkgs-1169336cd9aa65e31ca705b44ffafe297d9c2084.tar.zst
nixpkgs-1169336cd9aa65e31ca705b44ffafe297d9c2084.zip
Merge pull request #70448 from worldofpeace/lightdm-improve-systemd
nixos/lightdm: improve systemd service
Diffstat (limited to 'nixos/modules/services/x11')
-rw-r--r--nixos/modules/services/x11/display-managers/lightdm.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixos/modules/services/x11/display-managers/lightdm.nix b/nixos/modules/services/x11/display-managers/lightdm.nix
index f105cb496e6..aeee48de701 100644
--- a/nixos/modules/services/x11/display-managers/lightdm.nix
+++ b/nixos/modules/services/x11/display-managers/lightdm.nix
@@ -220,6 +220,42 @@ in
       exec ${lightdm}/sbin/lightdm
     '';
 
+    # Replaces getty and plymouth quit since it quits plymouth on it's own.
+    systemd.services.display-manager.conflicts = [
+      "getty@tty7.service"
+      "plymouth-quit.service"
+     ];
+
+    # Pull in dependencies of services we replace.
+    systemd.services.display-manager.after = [
+      "rc-local.service"
+      "systemd-machined.service"
+      "systemd-user-sessions.service"
+      "getty@tty7.service"
+      "user.slice"
+    ];
+
+    # user.slice needs to be present
+    systemd.services.display-manager.requires = [
+      "user.slice"
+    ];
+
+    # lightdm stops plymouth so when it fails make sure plymouth stops.
+    systemd.services.display-manager.onFailure = [
+      "plymouth-quit.service"
+    ];
+
+    systemd.services.display-manager.serviceConfig = {
+      BusName = "org.freedesktop.DisplayManager";
+      IgnoreSIGPIPE = "no";
+      # This allows lightdm to pass the LUKS password through to PAM.
+      # login keyring is unlocked automatic when autologin is used.
+      KeyringMode = "shared";
+      KillMode = "mixed";
+      StandardError = "inherit";
+      StandardOutput = "syslog";
+    };
+
     environment.etc."lightdm/lightdm.conf".source = lightdmConf;
     environment.etc."lightdm/users.conf".source = usersConf;