GNOME: Difference between revisions
m Integrated Minimal DE into main Gnome desktop section |
m →Experimental features: remove period from comment. |
||
| (13 intermediate revisions by 3 users not shown) | |||
| Line 6: | Line 6: | ||
=== GNOME desktop === | === GNOME desktop === | ||
To use the GNOME desktop environment on NixOS, the following configuration options must be set: | To use the GNOME desktop environment on NixOS, the following configuration module options must be set: | ||
{{file|3={ config, pkgs, ... }: | {{file|3={ config, pkgs, ... }: | ||
{ | { | ||
services.displayManager.gdm.enable = true; | services.displayManager.gdm.enable = true; | ||
services.desktopManager.gnome.enable = true; | services.desktopManager.gnome.enable = true; | ||
# | # To disable installing GNOME's suite of applications | ||
# and only be left with GNOME shell. | |||
services.gnome.core-apps.enable = false; | services.gnome.core-apps.enable = false; | ||
services.gnome.core-developer-tools.enable = false; | services.gnome.core-developer-tools.enable = false; | ||
services.gnome.games.enable = false; | services.gnome.games.enable = false; | ||
environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs ]; | environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs ]; | ||
}|name=/etc/nixos/configuration.nix|lang=nix}} | }|name=/etc/nixos/configuration.nix|lang=nix}}Mixing GNOME with other desktops (such as alternative login managers other than GDM) is not supported, make sure to disable other desktop modules before rebuilding if you encounter issues with conflicting desktops. | ||
=== GNOME extensions === | === GNOME extensions === | ||
| Line 152: | Line 143: | ||
For more details, see [https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/2 this] forum post.{{Note|Qt integration with the adwaita style isn't perfect and your mileage may vary.}} | For more details, see [https://discourse.nixos.org/t/guide-to-installing-qt-theme/35523/2 this] forum post.{{Note|Qt integration with the adwaita style isn't perfect and your mileage may vary.}} | ||
=== Experimental | === Experimental features === | ||
GNOME has a number of experimental | GNOME has a number of experimental options for features not fully completed and thus hidden from the user. As of GNOME 49, these are the experimental features you may want to use: | ||
{{File|3={ | {{File|3={ | ||
programs.dconf.profiles.user.databases = [ | programs.dconf.profiles.user.databases = [ | ||
| Line 163: | Line 154: | ||
"variable-refresh-rate" # Enables Variable Refresh Rate (VRR) on compatible displays | "variable-refresh-rate" # Enables Variable Refresh Rate (VRR) on compatible displays | ||
"xwayland-native-scaling" # Scales Xwayland applications to look crisp on HiDPI screens | "xwayland-native-scaling" # Scales Xwayland applications to look crisp on HiDPI screens | ||
"autoclose-xwayland" # automatically terminates Xwayland if all relevant X11 clients are gone | |||
]; | ]; | ||
}; | }; | ||
| Line 171: | Line 163: | ||
=== Discover dconf settings === | === Discover dconf settings === | ||
If you wish to discover the corresponding dconf entry for a given setting in a program, you can run | If you wish to discover the corresponding dconf entry for a given setting in a program, you can run <code>dconf watch /</code> inside of a terminal and change the setting graphically. For example, when changing toggling the Quick-Settings option "Dark Style" from "on" to "off" and back to "on," this will be the output:<syntaxhighlight lang="shell-session"> | ||
$ dconf watch / | $ dconf watch / | ||
/org/gnome/desktop/interface/color-scheme | /org/gnome/desktop/interface/color-scheme | ||
| Line 204: | Line 196: | ||
=== Enable system tray icons === | === Enable system tray icons === | ||
GNOME does not currently support system tray icons. However, Ubuntu has created an [https://extensions.gnome.org/extension/615/appindicator-support/ extension] that implements this in the top | GNOME does not currently support system tray icons. However, Ubuntu has created an [https://extensions.gnome.org/extension/615/appindicator-support/ extension] that implements this in the top panel. You can install this extension with the following in NixOS: | ||
{{File|3={ | {{File|3={ | ||
environment.systemPackages = [ pkgs.gnomeExtensions.appindicator | environment.systemPackages = [ pkgs.gnomeExtensions.appindicator ]; | ||
}|name=/etc/nixos/configuration.nix|lang=nix}}You can also install the extension outside of Nix and it will function the same. | |||
}|name=/etc/nixos/configuration.nix|lang=nix}} | |||
=== Profiling (with sysprof) === | === Profiling (with sysprof) === | ||
| Line 239: | Line 230: | ||
=== Excluding GNOME Applications === | === Excluding GNOME Applications === | ||
To exclude certain applications that are installed by default with GNOME, set the {{nixos:option|environment.gnome.excludePackages}} module option: | To exclude certain applications that are installed by default with GNOME, set the {{nixos:option|environment.gnome.excludePackages}} module option (Optional Packages: [https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/services/desktop-managers/gnome.nix#L449-L471 gnome.nix]): | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
environment.gnome.excludePackages = with pkgs; [ | environment.gnome.excludePackages = with pkgs; [ | ||
showtime | |||
]; | ]; | ||
</nowiki>}} | </nowiki>|name=/etc/nixos/configuration.nix|lang=nix}} | ||
== Troubleshooting == | == Troubleshooting == | ||
=== Missing cursor/cursor is a white box === | === Missing cursor/cursor is a white box === | ||
This occurs when installing GNOME from an existing NixOS installation that used a different desktop environment that modified dconf (most likely switching from KDE to GNOME). To easily fix this: reset all dconf settings.<syntaxhighlight lang="bash"> | This occurs when installing GNOME from an existing NixOS installation that used a different desktop environment that modified dconf (most likely switching from KDE to GNOME). To easily fix this alongside any number of silent incompatabilities: reset all dconf settings.<syntaxhighlight lang="bash"> | ||
$ dconf reset -f / | $ dconf reset -f / | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 272: | Line 263: | ||
=== Automatic login === | === Automatic login === | ||
For automatic login, include this in your NixOS configuration adjusting the "<your username>" part with your username: | |||
{{File|3={ | {{File|3={ | ||
services | services.displayManager.autoLogin.enable = true; | ||
services | services.displayManager.autoLogin.user = "<your username>"; | ||
}|name=/etc/nixos/configuration.nix|lang=nix}} | }|name=/etc/nixos/configuration.nix|lang=nix}} | ||