From 94f0210e60f08640cf8a6392545b4678ffe44218 Mon Sep 17 00:00:00 2001 From: WORLDofPEACE Date: Sat, 13 Feb 2021 18:45:27 -0500 Subject: [PATCH] nixos/tools: make desktopConfiguation types.listOf types.lines This fixes #108124. --- nixos/modules/installer/tools/tools.nix | 4 ++-- nixos/modules/services/x11/desktop-managers/gnome3.nix | 4 ++-- nixos/modules/services/x11/desktop-managers/plasma5.nix | 4 ++-- nixos/tests/nixos-generate-config.nix | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix index ada5f574856..68c5a686761 100644 --- a/nixos/modules/installer/tools/tools.nix +++ b/nixos/modules/installer/tools/tools.nix @@ -87,8 +87,8 @@ in desktopConfiguration = mkOption { internal = true; - type = types.str; - default = ""; + type = types.listOf types.lines; + default = []; description = '' Text to preseed the desktop configuration that nixos-generate-config saves to /etc/nixos/configuration.nix. diff --git a/nixos/modules/services/x11/desktop-managers/gnome3.nix b/nixos/modules/services/x11/desktop-managers/gnome3.nix index 671301246a8..dea45729947 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome3.nix +++ b/nixos/modules/services/x11/desktop-managers/gnome3.nix @@ -197,12 +197,12 @@ in config = mkMerge [ (mkIf (cfg.enable || flashbackEnabled) { # Seed our configuration into nixos-generate-config - system.nixos-generate-config.desktopConfiguration = '' + system.nixos-generate-config.desktopConfiguration = ['' # Enable the GNOME 3 Desktop Environment. services.xserver.enable = true; services.xserver.displayManager.gdm.enable = true; services.xserver.desktopManager.gnome3.enable = true; - ''; + '']; services.gnome3.core-os-services.enable = true; services.gnome3.core-shell.enable = true; diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix index d6cf86d3a2e..5ca2e69faf0 100644 --- a/nixos/modules/services/x11/desktop-managers/plasma5.nix +++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix @@ -184,12 +184,12 @@ in config = mkMerge [ (mkIf cfg.enable { # Seed our configuration into nixos-generate-config - system.nixos-generate-config.desktopConfiguration = '' + system.nixos-generate-config.desktopConfiguration = ['' # Enable the Plasma 5 Desktop Environment. services.xserver.enable = true; services.xserver.displayManager.sddm.enable = true; services.xserver.desktopManager.plasma5.enable = true; - ''; + '']; services.xserver.desktopManager.session = singleton { name = "plasma5"; diff --git a/nixos/tests/nixos-generate-config.nix b/nixos/tests/nixos-generate-config.nix index 5daa55a8abb..316950dcb01 100644 --- a/nixos/tests/nixos-generate-config.nix +++ b/nixos/tests/nixos-generate-config.nix @@ -11,12 +11,12 @@ import ./make-test-python.nix ({ lib, ... } : { } ''; - system.nixos-generate-config.desktopConfiguration = '' + system.nixos-generate-config.desktopConfiguration = ['' # DESKTOP # services.xserver.enable = true; # services.xserver.displayManager.gdm.enable = true; # services.xserver.desktopManager.gnome3.enable = true; - ''; + '']; }; testScript = '' start_all()