GNOME: Difference between revisions
→Experimental settings: update for GNOME 49. |
Langfingaz (talk | contribs) m →Qt integration for GNOME: missing semicolon |
||
| (4 intermediate revisions by 4 users not shown) | |||
| Line 75: | Line 75: | ||
}; | }; | ||
}; | }; | ||
}|name=~/.config/home-manager/home.nix|lang=nix}}Thus the settings attribute accepts an attribute set whose keys are schemas with each schema's value being a nested attribute set of the schema's keys with their appropriate GVariant value.{{Note|Schemas in Nix are written without leading and trailing slashes. In addition, since dconf have more data types than the Nix language (for example, tuples), in some cases you'll need to convert Nix value to a GVariant value. You can achieve that by using the functions defined under <code>lib.gvariant</code>, they're documented [https://nixos.org/manual/nixpkgs/stable/#sec-functions-library-gvariant here].}}If you wish to revert all dconf settings back to their default state (reset GNOME essentially) then use the following command which resets all schemas directories available on your system, note that this will affect all programs that use dconf, including GNOME apps and extensions.<syntaxhighlight lang= | }|name=~/.config/home-manager/home.nix|lang=nix}}Thus the settings attribute accepts an attribute set whose keys are schemas with each schema's value being a nested attribute set of the schema's keys with their appropriate GVariant value.{{Note|Schemas in Nix are written without leading and trailing slashes. In addition, since dconf have more data types than the Nix language (for example, tuples), in some cases you'll need to convert Nix value to a GVariant value. You can achieve that by using the functions defined under <code>lib.gvariant</code>, they're documented [https://nixos.org/manual/nixpkgs/stable/#sec-functions-library-gvariant here].}}If you wish to revert all dconf settings back to their default state (reset GNOME essentially) then use the following command which resets all schemas directories available on your system, note that this will affect all programs that use dconf, including GNOME apps and extensions. | ||
<syntaxhighlight lang=console> | |||
$ dconf reset -f / | $ dconf reset -f / | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 119: | Line 120: | ||
The GNOME shell extension [https://extensions.gnome.org/extension/3843/just-perfection/ Just Perfection] also allows for customizing nearly all parts of the GNOME shell interface. | The GNOME shell extension [https://extensions.gnome.org/extension/3843/just-perfection/ Just Perfection] also allows for customizing nearly all parts of the GNOME shell interface. | ||
=== | === Qt integration for GNOME === | ||
As of NixOS 26.05, the <code>qt.platformTheme = "gnome";</code> option results in broken Qt app theming when GNOME is set to dark mode. If you only want "Adwaita-looking" Qt apps so they don't look too out of place, you can install the packages for QAdwaitaDecorations and QGnomePlatform, which provide quite decent GNOME theming for Qt apps.<syntaxhighlight lang="nixos"># Install QAdwaitaDecorations and QGnomePlatform | |||
{ pkgs, ... }: | |||
{ | |||
environment.systemPackages = [ | |||
# Themes the app titlebars | |||
pkgs.qadwaitadecorations | |||
pkgs.qadwaitadecorations-qt6 | |||
# Themes the apps | |||
pkgs.qgnomeplatform | |||
pkgs.qgnomeplatform-qt6 | |||
]; | |||
}</syntaxhighlight>Alternatively, the older <code>qt.platformTheme</code> docs have been included below. | |||
In the following example configuration, Qt applications will have a look similar to the adwaita style used by GNOME using a dark theme. | |||
{{File|3={ | {{File|3={ | ||
qt = { | qt = { | ||
| Line 144: | Line 158: | ||
=== Experimental features === | === Experimental features === | ||
GNOME has a number of experimental options for features not fully completed and thus hidden from the user. As of GNOME | GNOME has a number of experimental options for features not fully completed and thus hidden from the user. As of GNOME 50, these are the experimental features you may want to try out: | ||
{{File|3={ | {{File|3={ | ||
programs.dconf.profiles.user.databases = [ | programs.dconf.profiles.user.databases = [ | ||
| Line 151: | Line 165: | ||
"org/gnome/mutter" = { | "org/gnome/mutter" = { | ||
experimental-features = [ | experimental-features = [ | ||
"autoclose-xwayland" # automatically terminates Xwayland if all relevant X11 clients are gone | |||
# "kms-modifiers" # allocate scanout buffers using "explicit modifiers" if your graphics driver supports it. Uncomment if you want to test NVIDIA optimizations | |||
"autoclose-xwayland" # automatically terminates Xwayland if all relevant X11 clients are gone. | |||
]; | ]; | ||
}; | }; | ||
| Line 206: | Line 218: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
services.sysprof.enable = true; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 212: | Line 224: | ||
<syntaxhighlight lang="nix"> | <syntaxhighlight lang="nix"> | ||
hardware.sensor.iio.enable = true; | |||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 233: | Line 245: | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
environment.gnome.excludePackages = with pkgs; [ | |||
showtime | |||
]; | |||
</nowiki>|name=/etc/nixos/configuration.nix|lang=nix}} | </nowiki>|name=/etc/nixos/configuration.nix|lang=nix}} | ||
| Line 241: | Line 253: | ||
=== 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 alongside any number of silent incompatabilities: reset all dconf settings.<syntaxhighlight lang= | 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=console> | |||
$ dconf reset -f / | $ dconf reset -f / | ||
</syntaxhighlight> | </syntaxhighlight> | ||