mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00

Since DEs like KDE Plasma 6, GNOME and COSMIC are not designed to be X11-exclusive, putting them under `services.xserver` is misleading. In particular, GNOME defaults to Wayland these days and X11 support is going to be dropped in near future. Let’s follow Plasma and move GNOME NixOS options out of `xserver` attribute. This patch does not include any changes to X11 support itself. Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
53 lines
1.6 KiB
Nix
53 lines
1.6 KiB
Nix
# This module defines a NixOS installation CD that contains GNOME.
|
|
|
|
{ lib, pkgs, ... }:
|
|
|
|
{
|
|
imports = [ ./installation-cd-graphical-calamares.nix ];
|
|
|
|
isoImage.edition = lib.mkDefault "gnome";
|
|
|
|
services.desktopManager.gnome = {
|
|
# Add Firefox and other tools useful for installation to the launcher
|
|
favoriteAppsOverride = ''
|
|
[org.gnome.shell]
|
|
favorite-apps=[ 'firefox.desktop', 'nixos-manual.desktop', 'org.gnome.Console.desktop', 'org.gnome.Nautilus.desktop', 'gparted.desktop', 'io.calamares.calamares.desktop' ]
|
|
'';
|
|
|
|
# Override GNOME defaults to disable GNOME tour and disable suspend
|
|
extraGSettingsOverrides = ''
|
|
[org.gnome.shell]
|
|
welcome-dialog-last-shown-version='9999999999'
|
|
[org.gnome.desktop.session]
|
|
idle-delay=0
|
|
[org.gnome.settings-daemon.plugins.power]
|
|
sleep-inactive-ac-type='nothing'
|
|
sleep-inactive-battery-type='nothing'
|
|
'';
|
|
|
|
extraGSettingsOverridePackages = [ pkgs.gnome-settings-daemon ];
|
|
|
|
enable = true;
|
|
};
|
|
|
|
# Fix scaling for calamares on wayland
|
|
environment.variables = {
|
|
QT_QPA_PLATFORM = "$([[ $XDG_SESSION_TYPE = \"wayland\" ]] && echo \"wayland\")";
|
|
};
|
|
|
|
services.displayManager.gdm = {
|
|
enable = true;
|
|
# autoSuspend makes the machine automatically suspend after inactivity.
|
|
# It's possible someone could/try to ssh'd into the machine and obviously
|
|
# have issues because it's inactive.
|
|
# See:
|
|
# * https://github.com/NixOS/nixpkgs/pull/63790
|
|
# * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22
|
|
autoSuspend = false;
|
|
};
|
|
|
|
services.displayManager.autoLogin = {
|
|
enable = true;
|
|
user = "nixos";
|
|
};
|
|
}
|