nixos/gnome: convert manual chapter to MD
This commit is contained in:
parent
8a86d1f759
commit
da6641a57a
167
nixos/modules/services/x11/desktop-managers/gnome.md
Normal file
167
nixos/modules/services/x11/desktop-managers/gnome.md
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
# GNOME Desktop {#chap-gnome}
|
||||||
|
|
||||||
|
GNOME provides a simple, yet full-featured desktop environment with a focus on productivity. Its Mutter compositor supports both Wayland and X server, and the GNOME Shell user interface is fully customizable by extensions.
|
||||||
|
|
||||||
|
## Enabling GNOME {#sec-gnome-enable}
|
||||||
|
|
||||||
|
All of the core apps, optional apps, games, and core developer tools from GNOME are available.
|
||||||
|
|
||||||
|
To enable the GNOME desktop use:
|
||||||
|
|
||||||
|
```
|
||||||
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
|
```
|
||||||
|
|
||||||
|
::: {.note}
|
||||||
|
While it is not strictly necessary to use GDM as the display manager with GNOME, it is recommended, as some features such as screen lock [might not work](#sec-gnome-faq-can-i-use-lightdm-with-gnome) without it.
|
||||||
|
:::
|
||||||
|
|
||||||
|
The default applications used in NixOS are very minimal, inspired by the defaults used in [gnome-build-meta](https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/40.0/elements/core/meta-gnome-core-utilities.bst).
|
||||||
|
|
||||||
|
### GNOME without the apps {#sec-gnome-without-the-apps}
|
||||||
|
|
||||||
|
If you’d like to only use the GNOME desktop and not the apps, you can disable them with:
|
||||||
|
|
||||||
|
```
|
||||||
|
services.gnome.core-utilities.enable = false;
|
||||||
|
```
|
||||||
|
|
||||||
|
and none of them will be installed.
|
||||||
|
|
||||||
|
If you’d only like to omit a subset of the core utilities, you can use
|
||||||
|
[](#opt-environment.gnome.excludePackages).
|
||||||
|
Note that this mechanism can only exclude core utilities, games and core developer tools.
|
||||||
|
|
||||||
|
### Disabling GNOME services {#sec-gnome-disabling-services}
|
||||||
|
|
||||||
|
It is also possible to disable many of the [core services](https://github.com/NixOS/nixpkgs/blob/b8ec4fd2a4edc4e30d02ba7b1a2cc1358f3db1d5/nixos/modules/services/x11/desktop-managers/gnome.nix#L329-L348). For example, if you do not need indexing files, you can disable Tracker with:
|
||||||
|
|
||||||
|
```
|
||||||
|
services.gnome.tracker-miners.enable = false;
|
||||||
|
services.gnome.tracker.enable = false;
|
||||||
|
```
|
||||||
|
|
||||||
|
Note, however, that doing so is not supported and might break some applications. Notably, GNOME Music cannot work without Tracker.
|
||||||
|
|
||||||
|
### GNOME games {#sec-gnome-games}
|
||||||
|
|
||||||
|
You can install all of the GNOME games with:
|
||||||
|
|
||||||
|
```
|
||||||
|
services.gnome.games.enable = true;
|
||||||
|
```
|
||||||
|
|
||||||
|
### GNOME core developer tools {#sec-gnome-core-developer-tools}
|
||||||
|
|
||||||
|
You can install GNOME core developer tools with:
|
||||||
|
|
||||||
|
```
|
||||||
|
services.gnome.core-developer-tools.enable = true;
|
||||||
|
```
|
||||||
|
|
||||||
|
## Enabling GNOME Flashback {#sec-gnome-enable-flashback}
|
||||||
|
|
||||||
|
GNOME Flashback provides a desktop environment based on the classic GNOME 2 architecture. You can enable the default GNOME Flashback session, which uses the Metacity window manager, with:
|
||||||
|
|
||||||
|
```
|
||||||
|
services.xserver.desktopManager.gnome.flashback.enableMetacity = true;
|
||||||
|
```
|
||||||
|
|
||||||
|
It is also possible to create custom sessions that replace Metacity with a different window manager using [](#opt-services.xserver.desktopManager.gnome.flashback.customSessions).
|
||||||
|
|
||||||
|
The following example uses `xmonad` window manager:
|
||||||
|
|
||||||
|
```
|
||||||
|
services.xserver.desktopManager.gnome.flashback.customSessions = [
|
||||||
|
{
|
||||||
|
wmName = "xmonad";
|
||||||
|
wmLabel = "XMonad";
|
||||||
|
wmCommand = "${pkgs.haskellPackages.xmonad}/bin/xmonad";
|
||||||
|
enableGnomePanel = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
## Icons and GTK Themes {#sec-gnome-icons-and-gtk-themes}
|
||||||
|
|
||||||
|
Icon themes and GTK themes don’t require any special option to install in NixOS.
|
||||||
|
|
||||||
|
You can add them to [](#opt-environment.systemPackages) and switch to them with GNOME Tweaks.
|
||||||
|
If you’d like to do this manually in dconf, change the values of the following keys:
|
||||||
|
|
||||||
|
```
|
||||||
|
/org/gnome/desktop/interface/gtk-theme
|
||||||
|
/org/gnome/desktop/interface/icon-theme
|
||||||
|
```
|
||||||
|
|
||||||
|
in `dconf-editor`
|
||||||
|
|
||||||
|
## Shell Extensions {#sec-gnome-shell-extensions}
|
||||||
|
|
||||||
|
Most Shell extensions are packaged under the `gnomeExtensions` attribute.
|
||||||
|
Some packages that include Shell extensions, like `gnome.gpaste`, don’t have their extension decoupled under this attribute.
|
||||||
|
|
||||||
|
You can install them like any other package:
|
||||||
|
|
||||||
|
```
|
||||||
|
environment.systemPackages = [
|
||||||
|
gnomeExtensions.dash-to-dock
|
||||||
|
gnomeExtensions.gsconnect
|
||||||
|
gnomeExtensions.mpris-indicator-button
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
|
Unfortunately, we lack a way for these to be managed in a completely declarative way.
|
||||||
|
So you have to enable them manually with an Extensions application.
|
||||||
|
It is possible to use a [GSettings override](#sec-gnome-gsettings-overrides) for this on `org.gnome.shell.enabled-extensions`, but that will only influence the default value.
|
||||||
|
|
||||||
|
## GSettings Overrides {#sec-gnome-gsettings-overrides}
|
||||||
|
|
||||||
|
Majority of software building on the GNOME platform use GLib’s [GSettings](https://developer.gnome.org/gio/unstable/GSettings.html) system to manage runtime configuration. For our purposes, the system consists of XML schemas describing the individual configuration options, stored in the package, and a settings backend, where the values of the settings are stored. On NixOS, like on most Linux distributions, dconf database is used as the backend.
|
||||||
|
|
||||||
|
[GSettings vendor overrides](https://developer.gnome.org/gio/unstable/GSettings.html#id-1.4.19.2.9.25) can be used to adjust the default values for settings of the GNOME desktop and apps by replacing the default values specified in the XML schemas. Using overrides will allow you to pre-seed user settings before you even start the session.
|
||||||
|
|
||||||
|
::: {.warning}
|
||||||
|
Overrides really only change the default values for GSettings keys so if you or an application changes the setting value, the value set by the override will be ignored. Until [NixOS’s dconf module implements changing values](https://github.com/NixOS/nixpkgs/issues/54150), you will either need to keep that in mind and clear the setting from the backend using `dconf reset` command when that happens, or use the [module from home-manager](https://nix-community.github.io/home-manager/options.html#opt-dconf.settings).
|
||||||
|
:::
|
||||||
|
|
||||||
|
You can override the default GSettings values using the
|
||||||
|
[](#opt-services.xserver.desktopManager.gnome.extraGSettingsOverrides) option.
|
||||||
|
|
||||||
|
Take note that whatever packages you want to override GSettings for, you need to add them to
|
||||||
|
[](#opt-services.xserver.desktopManager.gnome.extraGSettingsOverridePackages).
|
||||||
|
|
||||||
|
You can use `dconf-editor` tool to explore which GSettings you can set.
|
||||||
|
|
||||||
|
### Example {#sec-gnome-gsettings-overrides-example}
|
||||||
|
|
||||||
|
```
|
||||||
|
services.xserver.desktopManager.gnome = {
|
||||||
|
extraGSettingsOverrides = ''
|
||||||
|
# Change default background
|
||||||
|
[org.gnome.desktop.background]
|
||||||
|
picture-uri='file://${pkgs.nixos-artwork.wallpapers.mosaic-blue.gnomeFilePath}'
|
||||||
|
|
||||||
|
# Favorite apps in gnome-shell
|
||||||
|
[org.gnome.shell]
|
||||||
|
favorite-apps=['org.gnome.Photos.desktop', 'org.gnome.Nautilus.desktop']
|
||||||
|
'';
|
||||||
|
|
||||||
|
extraGSettingsOverridePackages = [
|
||||||
|
pkgs.gsettings-desktop-schemas # for org.gnome.desktop
|
||||||
|
pkgs.gnome.gnome-shell # for org.gnome.shell
|
||||||
|
];
|
||||||
|
};
|
||||||
|
```
|
||||||
|
|
||||||
|
## Frequently Asked Questions {#sec-gnome-faq}
|
||||||
|
|
||||||
|
### Can I use LightDM with GNOME? {#sec-gnome-faq-can-i-use-lightdm-with-gnome}
|
||||||
|
|
||||||
|
Yes you can, and any other display-manager in NixOS.
|
||||||
|
|
||||||
|
However, it doesn’t work correctly for the Wayland session of GNOME Shell yet, and
|
||||||
|
won’t be able to lock your screen.
|
||||||
|
|
||||||
|
See [this issue.](https://github.com/NixOS/nixpkgs/issues/56342)
|
@ -66,6 +66,8 @@ in
|
|||||||
{
|
{
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
# Don't edit the docbook xml directly, edit the md and generate it:
|
||||||
|
# `pandoc gnome.md -t docbook --top-level-division=chapter --extract-media=media -f markdown-smart --lua-filter ../../../../../doc/build-aux/pandoc-filters/myst-reader/roles.lua --lua-filter ../../../../../doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua > gnome.xml`
|
||||||
doc = ./gnome.xml;
|
doc = ./gnome.xml;
|
||||||
maintainers = teams.gnome.members;
|
maintainers = teams.gnome.members;
|
||||||
};
|
};
|
||||||
|
@ -1,166 +1,156 @@
|
|||||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="chap-gnome">
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xml:id="chap-gnome">
|
|
||||||
<title>GNOME Desktop</title>
|
<title>GNOME Desktop</title>
|
||||||
<para>
|
<para>
|
||||||
GNOME provides a simple, yet full-featured desktop environment with a focus on productivity. Its Mutter compositor supports both Wayland and X server, and the GNOME Shell user interface is fully customizable by extensions.
|
GNOME provides a simple, yet full-featured desktop environment with
|
||||||
|
a focus on productivity. Its Mutter compositor supports both Wayland
|
||||||
|
and X server, and the GNOME Shell user interface is fully
|
||||||
|
customizable by extensions.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-enable">
|
<section xml:id="sec-gnome-enable">
|
||||||
<title>Enabling GNOME</title>
|
<title>Enabling GNOME</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
All of the core apps, optional apps, games, and core developer tools from GNOME are available.
|
All of the core apps, optional apps, games, and core developer
|
||||||
|
tools from GNOME are available.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
To enable the GNOME desktop use:
|
To enable the GNOME desktop use:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<note>
|
<note>
|
||||||
<para>
|
<para>
|
||||||
While it is not strictly necessary to use GDM as the display manager with GNOME, it is recommended, as some features such as screen lock <link xlink:href="#sec-gnome-faq-can-i-use-lightdm-with-gnome">might not work</link> without it.
|
While it is not strictly necessary to use GDM as the display
|
||||||
|
manager with GNOME, it is recommended, as some features such as
|
||||||
|
screen lock
|
||||||
|
<link linkend="sec-gnome-faq-can-i-use-lightdm-with-gnome">might
|
||||||
|
not work</link> without it.
|
||||||
</para>
|
</para>
|
||||||
</note>
|
</note>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The default applications used in NixOS are very minimal, inspired by the defaults used in <link xlink:href="https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/40.0/elements/core/meta-gnome-core-utilities.bst">gnome-build-meta</link>.
|
The default applications used in NixOS are very minimal, inspired
|
||||||
|
by the defaults used in
|
||||||
|
<link xlink:href="https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/40.0/elements/core/meta-gnome-core-utilities.bst">gnome-build-meta</link>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-without-the-apps">
|
<section xml:id="sec-gnome-without-the-apps">
|
||||||
<title>GNOME without the apps</title>
|
<title>GNOME without the apps</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you’d like to only use the GNOME desktop and not the apps, you can disable them with:
|
If you’d like to only use the GNOME desktop and not the apps,
|
||||||
|
you can disable them with:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
services.gnome.core-utilities.enable = false;
|
services.gnome.core-utilities.enable = false;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
and none of them will be installed.
|
and none of them will be installed.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
If you’d only like to omit a subset of the core utilities, you can use <xref linkend="opt-environment.gnome.excludePackages"/>.
|
If you’d only like to omit a subset of the core utilities, you
|
||||||
Note that this mechanism can only exclude core utilities, games and core developer tools.
|
can use
|
||||||
|
<xref linkend="opt-environment.gnome.excludePackages"></xref>.
|
||||||
|
Note that this mechanism can only exclude core utilities, games
|
||||||
|
and core developer tools.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-disabling-services">
|
<section xml:id="sec-gnome-disabling-services">
|
||||||
<title>Disabling GNOME services</title>
|
<title>Disabling GNOME services</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
It is also possible to disable many of the <link xlink:href="https://github.com/NixOS/nixpkgs/blob/b8ec4fd2a4edc4e30d02ba7b1a2cc1358f3db1d5/nixos/modules/services/x11/desktop-managers/gnome.nix#L329-L348">core services</link>. For example, if you do not need indexing files, you can disable Tracker with:
|
It is also possible to disable many of the
|
||||||
|
<link xlink:href="https://github.com/NixOS/nixpkgs/blob/b8ec4fd2a4edc4e30d02ba7b1a2cc1358f3db1d5/nixos/modules/services/x11/desktop-managers/gnome.nix#L329-L348">core
|
||||||
|
services</link>. For example, if you do not need indexing files,
|
||||||
|
you can disable Tracker with:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
services.gnome.tracker-miners.enable = false;
|
services.gnome.tracker-miners.enable = false;
|
||||||
services.gnome.tracker.enable = false;
|
services.gnome.tracker.enable = false;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Note, however, that doing so is not supported and might break some applications. Notably, GNOME Music cannot work without Tracker.
|
Note, however, that doing so is not supported and might break
|
||||||
|
some applications. Notably, GNOME Music cannot work without
|
||||||
|
Tracker.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-games">
|
<section xml:id="sec-gnome-games">
|
||||||
<title>GNOME games</title>
|
<title>GNOME games</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can install all of the GNOME games with:
|
You can install all of the GNOME games with:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
services.gnome.games.enable = true;
|
services.gnome.games.enable = true;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-core-developer-tools">
|
<section xml:id="sec-gnome-core-developer-tools">
|
||||||
<title>GNOME core developer tools</title>
|
<title>GNOME core developer tools</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can install GNOME core developer tools with:
|
You can install GNOME core developer tools with:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
services.gnome.core-developer-tools.enable = true;
|
services.gnome.core-developer-tools.enable = true;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-enable-flashback">
|
<section xml:id="sec-gnome-enable-flashback">
|
||||||
<title>Enabling GNOME Flashback</title>
|
<title>Enabling GNOME Flashback</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
GNOME Flashback provides a desktop environment based on the classic GNOME 2 architecture. You can enable the default GNOME Flashback session, which uses the Metacity window manager, with:
|
GNOME Flashback provides a desktop environment based on the
|
||||||
|
classic GNOME 2 architecture. You can enable the default GNOME
|
||||||
|
Flashback session, which uses the Metacity window manager, with:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
services.xserver.desktopManager.gnome.flashback.enableMetacity = true;
|
services.xserver.desktopManager.gnome.flashback.enableMetacity = true;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
It is also possible to create custom sessions that replace Metacity with a different window manager using <xref linkend="opt-services.xserver.desktopManager.gnome.flashback.customSessions"/>.
|
It is also possible to create custom sessions that replace
|
||||||
|
Metacity with a different window manager using
|
||||||
|
<xref linkend="opt-services.xserver.desktopManager.gnome.flashback.customSessions"></xref>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The following example uses <literal>xmonad</literal> window manager:
|
The following example uses <literal>xmonad</literal> window
|
||||||
|
manager:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
services.xserver.desktopManager.gnome.flashback.customSessions = [
|
services.xserver.desktopManager.gnome.flashback.customSessions = [
|
||||||
{
|
{
|
||||||
wmName = "xmonad";
|
wmName = "xmonad";
|
||||||
wmLabel = "XMonad";
|
wmLabel = "XMonad";
|
||||||
wmCommand = "${pkgs.haskellPackages.xmonad}/bin/xmonad";
|
wmCommand = "${pkgs.haskellPackages.xmonad}/bin/xmonad";
|
||||||
enableGnomePanel = false;
|
enableGnomePanel = false;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-icons-and-gtk-themes">
|
<section xml:id="sec-gnome-icons-and-gtk-themes">
|
||||||
<title>Icons and GTK Themes</title>
|
<title>Icons and GTK Themes</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Icon themes and GTK themes don’t require any special option to install in NixOS.
|
Icon themes and GTK themes don’t require any special option to
|
||||||
|
install in NixOS.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can add them to <xref linkend="opt-environment.systemPackages"/> and switch to them with GNOME Tweaks.
|
You can add them to
|
||||||
If you’d like to do this manually in dconf, change the values of the following keys:
|
<xref linkend="opt-environment.systemPackages"></xref> and switch
|
||||||
|
to them with GNOME Tweaks. If you’d like to do this manually in
|
||||||
|
dconf, change the values of the following keys:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
/org/gnome/desktop/interface/gtk-theme
|
/org/gnome/desktop/interface/gtk-theme
|
||||||
/org/gnome/desktop/interface/icon-theme
|
/org/gnome/desktop/interface/icon-theme
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
in <literal>dconf-editor</literal>
|
in <literal>dconf-editor</literal>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-shell-extensions">
|
<section xml:id="sec-gnome-shell-extensions">
|
||||||
<title>Shell Extensions</title>
|
<title>Shell Extensions</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Most Shell extensions are packaged under the <literal>gnomeExtensions</literal> attribute.
|
Most Shell extensions are packaged under the
|
||||||
Some packages that include Shell extensions, like <literal>gnome.gpaste</literal>, don’t have their extension decoupled under this attribute.
|
<literal>gnomeExtensions</literal> attribute. Some packages that
|
||||||
|
include Shell extensions, like <literal>gnome.gpaste</literal>,
|
||||||
|
don’t have their extension decoupled under this attribute.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can install them like any other package:
|
You can install them like any other package:
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
gnomeExtensions.dash-to-dock
|
gnomeExtensions.dash-to-dock
|
||||||
@ -168,47 +158,66 @@ environment.systemPackages = [
|
|||||||
gnomeExtensions.mpris-indicator-button
|
gnomeExtensions.mpris-indicator-button
|
||||||
];
|
];
|
||||||
</programlisting>
|
</programlisting>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Unfortunately, we lack a way for these to be managed in a completely declarative way.
|
Unfortunately, we lack a way for these to be managed in a
|
||||||
So you have to enable them manually with an Extensions application.
|
completely declarative way. So you have to enable them manually
|
||||||
It is possible to use a <link xlink:href="#sec-gnome-gsettings-overrides">GSettings override</link> for this on <literal>org.gnome.shell.enabled-extensions</literal>, but that will only influence the default value.
|
with an Extensions application. It is possible to use a
|
||||||
|
<link linkend="sec-gnome-gsettings-overrides">GSettings
|
||||||
|
override</link> for this on
|
||||||
|
<literal>org.gnome.shell.enabled-extensions</literal>, but that
|
||||||
|
will only influence the default value.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-gsettings-overrides">
|
<section xml:id="sec-gnome-gsettings-overrides">
|
||||||
<title>GSettings Overrides</title>
|
<title>GSettings Overrides</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Majority of software building on the GNOME platform use GLib’s <link xlink:href="https://developer.gnome.org/gio/unstable/GSettings.html">GSettings</link> system to manage runtime configuration. For our purposes, the system consists of XML schemas describing the individual configuration options, stored in the package, and a settings backend, where the values of the settings are stored. On NixOS, like on most Linux distributions, dconf database is used as the backend.
|
Majority of software building on the GNOME platform use GLib’s
|
||||||
|
<link xlink:href="https://developer.gnome.org/gio/unstable/GSettings.html">GSettings</link>
|
||||||
|
system to manage runtime configuration. For our purposes, the
|
||||||
|
system consists of XML schemas describing the individual
|
||||||
|
configuration options, stored in the package, and a settings
|
||||||
|
backend, where the values of the settings are stored. On NixOS,
|
||||||
|
like on most Linux distributions, dconf database is used as the
|
||||||
|
backend.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
<link xlink:href="https://developer.gnome.org/gio/unstable/GSettings.html#id-1.4.19.2.9.25">GSettings vendor overrides</link> can be used to adjust the default values for settings of the GNOME desktop and apps by replacing the default values specified in the XML schemas. Using overrides will allow you to pre-seed user settings before you even start the session.
|
<link xlink:href="https://developer.gnome.org/gio/unstable/GSettings.html#id-1.4.19.2.9.25">GSettings
|
||||||
|
vendor overrides</link> can be used to adjust the default values
|
||||||
|
for settings of the GNOME desktop and apps by replacing the
|
||||||
|
default values specified in the XML schemas. Using overrides will
|
||||||
|
allow you to pre-seed user settings before you even start the
|
||||||
|
session.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<warning>
|
<warning>
|
||||||
<para>
|
<para>
|
||||||
Overrides really only change the default values for GSettings keys so if you or an application changes the setting value, the value set by the override will be ignored. Until <link xlink:href="https://github.com/NixOS/nixpkgs/issues/54150">NixOS’s dconf module implements changing values</link>, you will either need to keep that in mind and clear the setting from the backend using <literal>dconf reset</literal> command when that happens, or use the <link xlink:href="https://nix-community.github.io/home-manager/options.html#opt-dconf.settings">module from home-manager</link>.
|
Overrides really only change the default values for GSettings
|
||||||
|
keys so if you or an application changes the setting value, the
|
||||||
|
value set by the override will be ignored. Until
|
||||||
|
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/54150">NixOS’s
|
||||||
|
dconf module implements changing values</link>, you will either
|
||||||
|
need to keep that in mind and clear the setting from the backend
|
||||||
|
using <literal>dconf reset</literal> command when that happens,
|
||||||
|
or use the
|
||||||
|
<link xlink:href="https://nix-community.github.io/home-manager/options.html#opt-dconf.settings">module
|
||||||
|
from home-manager</link>.
|
||||||
</para>
|
</para>
|
||||||
</warning>
|
</warning>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can override the default GSettings values using the <xref linkend="opt-services.xserver.desktopManager.gnome.extraGSettingsOverrides"/> option.
|
You can override the default GSettings values using the
|
||||||
|
<xref linkend="opt-services.xserver.desktopManager.gnome.extraGSettingsOverrides"></xref>
|
||||||
|
option.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Take note that whatever packages you want to override GSettings for, you need to add them to
|
Take note that whatever packages you want to override GSettings
|
||||||
<xref linkend="opt-services.xserver.desktopManager.gnome.extraGSettingsOverridePackages"/>.
|
for, you need to add them to
|
||||||
|
<xref linkend="opt-services.xserver.desktopManager.gnome.extraGSettingsOverridePackages"></xref>.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can use <literal>dconf-editor</literal> tool to explore which GSettings you can set.
|
You can use <literal>dconf-editor</literal> tool to explore which
|
||||||
|
GSettings you can set.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-gsettings-overrides-example">
|
<section xml:id="sec-gnome-gsettings-overrides-example">
|
||||||
<title>Example</title>
|
<title>Example</title>
|
||||||
|
|
||||||
<programlisting>
|
<programlisting>
|
||||||
services.xserver.desktopManager.gnome = {
|
services.xserver.desktopManager.gnome = {
|
||||||
extraGSettingsOverrides = ''
|
extraGSettingsOverrides = ''
|
||||||
@ -229,24 +238,21 @@ services.xserver.desktopManager.gnome = {
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-faq">
|
<section xml:id="sec-gnome-faq">
|
||||||
<title>Frequently Asked Questions</title>
|
<title>Frequently Asked Questions</title>
|
||||||
|
|
||||||
<section xml:id="sec-gnome-faq-can-i-use-lightdm-with-gnome">
|
<section xml:id="sec-gnome-faq-can-i-use-lightdm-with-gnome">
|
||||||
<title>Can I use LightDM with GNOME?</title>
|
<title>Can I use LightDM with GNOME?</title>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
Yes you can, and any other display-manager in NixOS.
|
Yes you can, and any other display-manager in NixOS.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
However, it doesn’t work correctly for the Wayland session of GNOME Shell yet, and
|
However, it doesn’t work correctly for the Wayland session of
|
||||||
won’t be able to lock your screen.
|
GNOME Shell yet, and won’t be able to lock your screen.
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
See <link xlink:href="https://github.com/NixOS/nixpkgs/issues/56342">this issue.</link>
|
See
|
||||||
|
<link xlink:href="https://github.com/NixOS/nixpkgs/issues/56342">this
|
||||||
|
issue.</link>
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
|
Loading…
Reference in New Issue
Block a user