1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 23:20:55 +00:00

Merge pull request #60776 from alyssais/xerror

nixos/xserver: improve DM error message when X off
This commit is contained in:
Alyssa Ross 2019-05-08 12:19:14 +00:00 committed by GitHub
commit 7261ffc18e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -189,6 +189,11 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ assertions = [
{ assertion = xcfg.enable;
message = ''
LightDM requires services.xserver.enable to be true
'';
}
{ assertion = cfg.autoLogin.enable -> cfg.autoLogin.user != null; { assertion = cfg.autoLogin.enable -> cfg.autoLogin.user != null;
message = '' message = ''
LightDM auto-login requires services.xserver.displayManager.lightdm.autoLogin.user to be set LightDM auto-login requires services.xserver.displayManager.lightdm.autoLogin.user to be set

View file

@ -195,6 +195,11 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = [ assertions = [
{ assertion = xcfg.enable;
message = ''
SDDM requires services.xserver.enable to be true
'';
}
{ assertion = cfg.autoLogin.enable -> cfg.autoLogin.user != null; { assertion = cfg.autoLogin.enable -> cfg.autoLogin.user != null;
message = '' message = ''
SDDM auto-login requires services.xserver.displayManager.sddm.autoLogin.user to be set SDDM auto-login requires services.xserver.displayManager.sddm.autoLogin.user to be set
@ -264,8 +269,8 @@ in
}; };
environment.etc."sddm.conf".source = cfgFile; environment.etc."sddm.conf".source = cfgFile;
environment.pathsToLink = [ environment.pathsToLink = [
"/share/sddm" "/share/sddm"
]; ];
users.groups.sddm.gid = config.ids.gids.sddm; users.groups.sddm.gid = config.ids.gids.sddm;