0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

nixos/tools: make desktopConfiguation types.listOf types.lines

This fixes #108124.
This commit is contained in:
WORLDofPEACE 2021-02-13 18:45:27 -05:00
parent edf3a8376e
commit 94f0210e60
4 changed files with 8 additions and 8 deletions

View file

@ -87,8 +87,8 @@ in
desktopConfiguration = mkOption { desktopConfiguration = mkOption {
internal = true; internal = true;
type = types.str; type = types.listOf types.lines;
default = ""; default = [];
description = '' description = ''
Text to preseed the desktop configuration that <literal>nixos-generate-config</literal> Text to preseed the desktop configuration that <literal>nixos-generate-config</literal>
saves to <literal>/etc/nixos/configuration.nix</literal>. saves to <literal>/etc/nixos/configuration.nix</literal>.

View file

@ -197,12 +197,12 @@ in
config = mkMerge [ config = mkMerge [
(mkIf (cfg.enable || flashbackEnabled) { (mkIf (cfg.enable || flashbackEnabled) {
# Seed our configuration into nixos-generate-config # Seed our configuration into nixos-generate-config
system.nixos-generate-config.desktopConfiguration = '' system.nixos-generate-config.desktopConfiguration = [''
# Enable the GNOME 3 Desktop Environment. # Enable the GNOME 3 Desktop Environment.
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true; services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome3.enable = true; services.xserver.desktopManager.gnome3.enable = true;
''; ''];
services.gnome3.core-os-services.enable = true; services.gnome3.core-os-services.enable = true;
services.gnome3.core-shell.enable = true; services.gnome3.core-shell.enable = true;

View file

@ -184,12 +184,12 @@ in
config = mkMerge [ config = mkMerge [
(mkIf cfg.enable { (mkIf cfg.enable {
# Seed our configuration into nixos-generate-config # Seed our configuration into nixos-generate-config
system.nixos-generate-config.desktopConfiguration = '' system.nixos-generate-config.desktopConfiguration = [''
# Enable the Plasma 5 Desktop Environment. # Enable the Plasma 5 Desktop Environment.
services.xserver.enable = true; services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true; services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true; services.xserver.desktopManager.plasma5.enable = true;
''; ''];
services.xserver.desktopManager.session = singleton { services.xserver.desktopManager.session = singleton {
name = "plasma5"; name = "plasma5";

View file

@ -11,12 +11,12 @@ import ./make-test-python.nix ({ lib, ... } : {
} }
''; '';
system.nixos-generate-config.desktopConfiguration = '' system.nixos-generate-config.desktopConfiguration = [''
# DESKTOP # DESKTOP
# services.xserver.enable = true; # services.xserver.enable = true;
# services.xserver.displayManager.gdm.enable = true; # services.xserver.displayManager.gdm.enable = true;
# services.xserver.desktopManager.gnome3.enable = true; # services.xserver.desktopManager.gnome3.enable = true;
''; ''];
}; };
testScript = '' testScript = ''
start_all() start_all()