1# This module defines a NixOS installation CD that contains GNOME.
2
3{ pkgs, ... }:
4
5{
6 imports = [ ./installation-cd-graphical-calamares.nix ];
7
8 isoImage.edition = "gnome";
9
10 services.xserver.desktopManager.gnome = {
11 # Add Firefox and other tools useful for installation to the launcher
12 favoriteAppsOverride = ''
13 [org.gnome.shell]
14 favorite-apps=[ 'firefox.desktop', 'nixos-manual.desktop', 'org.gnome.Console.desktop', 'org.gnome.Nautilus.desktop', 'gparted.desktop', 'io.calamares.calamares.desktop' ]
15 '';
16
17 # Override GNOME defaults to disable GNOME tour and disable suspend
18 extraGSettingsOverrides = ''
19 [org.gnome.shell]
20 welcome-dialog-last-shown-version='9999999999'
21 [org.gnome.desktop.session]
22 idle-delay=0
23 [org.gnome.settings-daemon.plugins.power]
24 sleep-inactive-ac-type='nothing'
25 sleep-inactive-battery-type='nothing'
26 '';
27
28 extraGSettingsOverridePackages = [ pkgs.gnome.gnome-settings-daemon ];
29
30 enable = true;
31 };
32
33 # Theme calamares with GNOME theme
34 qt = {
35 enable = true;
36 platformTheme = "gnome";
37 };
38
39 # Fix scaling for calamares on wayland
40 environment.variables = {
41 QT_QPA_PLATFORM = "$([[ $XDG_SESSION_TYPE = \"wayland\" ]] && echo \"wayland\")";
42 };
43
44 services.xserver.displayManager = {
45 gdm = {
46 enable = true;
47 # autoSuspend makes the machine automatically suspend after inactivity.
48 # It's possible someone could/try to ssh'd into the machine and obviously
49 # have issues because it's inactive.
50 # See:
51 # * https://github.com/NixOS/nixpkgs/pull/63790
52 # * https://gitlab.gnome.org/GNOME/gnome-control-center/issues/22
53 autoSuspend = false;
54 };
55 autoLogin = {
56 enable = true;
57 user = "nixos";
58 };
59 };
60}