Skip to content

Commit

Permalink
nixos/lightdm: use systemd.tmpfiles (#46734)
Browse files Browse the repository at this point in the history
This also makes logs appear at /var/log/lightdm

(cherry picked from commit 67e9571)
  • Loading branch information
worldofpeace authored and xeji committed Sep 17, 2018
1 parent 48bdc51 commit 03f1f35
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions nixos/modules/services/x11/display-managers/lightdm.nix
Expand Up @@ -197,7 +197,7 @@ in
# lightdm relaunches itself via just `lightdm`, so needs to be on the PATH
execCmd = ''
export PATH=${lightdm}/sbin:$PATH
exec ${lightdm}/sbin/lightdm --log-dir=/var/log --run-dir=/run
exec ${lightdm}/sbin/lightdm
'';
};

Expand Down Expand Up @@ -246,12 +246,19 @@ in
'';

users.users.lightdm = {
createHome = true;
home = "/var/lib/lightdm-data";
home = "/var/lib/lightdm";
group = "lightdm";
uid = config.ids.uids.lightdm;
};

systemd.tmpfiles.rules = [
"d /var/run/lightdm 0711 lightdm lightdm 0"
"d /var/cache/lightdm 0711 root lightdm -"
"d /var/lib/lightdm 1770 lightdm lightdm -"
"d /var/lib/lightdm-data 1775 lightdm lightdm -"
"d /var/log/lightdm 0711 root lightdm -"
];

users.groups.lightdm.gid = config.ids.gids.lightdm;
services.xserver.tty = null; # We might start multiple X servers so let the tty increment themselves..
services.xserver.display = null; # We specify our own display (and logfile) in xserver-wrapper up there
Expand Down

0 comments on commit 03f1f35

Please sign in to comment.