From 452f7e14d4f4bf41400350917685e2ad98590b28 Mon Sep 17 00:00:00 2001 From: WORLDofPEACE Date: Sat, 13 Feb 2021 17:42:34 -0500 Subject: [PATCH] nixos/tools: generate an xserver config The desktop configuration won't enable xserver. If there's multiple desktops enabled they will now evaluate properly. --- .../installer/tools/nixos-generate-config.pl | 18 ++++++++++++++++++ nixos/modules/installer/tools/tools.nix | 3 +++ .../services/x11/desktop-managers/gnome3.nix | 1 - .../services/x11/desktop-managers/plasma5.nix | 1 - nixos/tests/nixos-generate-config.nix | 5 ++--- 5 files changed, 23 insertions(+), 5 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl index 6e3ddb875e1..7bc55e67134 100644 --- a/nixos/modules/installer/tools/nixos-generate-config.pl +++ b/nixos/modules/installer/tools/nixos-generate-config.pl @@ -585,6 +585,22 @@ EOF return $config; } +sub generateXserverConfig { + my $xserverEnabled = "@xserverEnabled@"; + + my $config = ""; + if ($xserverEnabled eq "1") { + $config = <