diff options
author | Janne Heß <janne@hess.ooo> | 2024-03-27 19:10:27 +0100 |
---|---|---|
committer | Valentin Gagarin <valentin.gagarin@tweag.io> | 2024-03-28 09:28:12 +0100 |
commit | fcc95ff8172cc68a0d2d52aa1e8ef2120d2904ec (patch) | |
tree | 8de1a02f7d1624c97562c7736896a6c95c74ec04 /nixos/modules/services/x11 | |
parent | bc77c7a9730833c7668c92288c6af950e7270cb5 (diff) |
treewide: Fix all Nix ASTs in all markdown files
This allows for correct highlighting and maybe future automatic
formatting. The AST was verified to work with nixfmt only.
Diffstat (limited to 'nixos/modules/services/x11')
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/gnome.md | 92 | ||||
-rw-r--r-- | nixos/modules/services/x11/desktop-managers/pantheon.md | 27 |
2 files changed, 73 insertions, 46 deletions
diff --git a/nixos/modules/services/x11/desktop-managers/gnome.md b/nixos/modules/services/x11/desktop-managers/gnome.md index e0cfb03580db..2b4bd06df04f 100644 --- a/nixos/modules/services/x11/desktop-managers/gnome.md +++ b/nixos/modules/services/x11/desktop-managers/gnome.md @@ -9,8 +9,10 @@ All of the core apps, optional apps, games, and core developer tools from GNOME To enable the GNOME desktop use: ```nix -services.xserver.desktopManager.gnome.enable = true; -services.xserver.displayManager.gdm.enable = true; +{ + services.xserver.desktopManager.gnome.enable = true; + services.xserver.displayManager.gdm.enable = true; +} ``` ::: {.note} @@ -24,7 +26,9 @@ The default applications used in NixOS are very minimal, inspired by the default If you’d like to only use the GNOME desktop and not the apps, you can disable them with: ```nix -services.gnome.core-utilities.enable = false; +{ + services.gnome.core-utilities.enable = false; +} ``` and none of them will be installed. @@ -38,8 +42,10 @@ Note that this mechanism can only exclude core utilities, games and core develop 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: ```nix -services.gnome.tracker-miners.enable = false; -services.gnome.tracker.enable = false; +{ + 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. @@ -49,7 +55,9 @@ Note, however, that doing so is not supported and might break some applications. You can install all of the GNOME games with: ```nix -services.gnome.games.enable = true; +{ + services.gnome.games.enable = true; +} ``` ### GNOME core developer tools {#sec-gnome-core-developer-tools} @@ -57,7 +65,9 @@ services.gnome.games.enable = true; You can install GNOME core developer tools with: ```nix -services.gnome.core-developer-tools.enable = true; +{ + services.gnome.core-developer-tools.enable = true; +} ``` ## Enabling GNOME Flashback {#sec-gnome-enable-flashback} @@ -65,7 +75,9 @@ services.gnome.core-developer-tools.enable = true; 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: ```nix -services.xserver.desktopManager.gnome.flashback.enableMetacity = true; +{ + 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). @@ -73,14 +85,16 @@ It is also possible to create custom sessions that replace Metacity with a diffe The following example uses `xmonad` window manager: ```nix -services.xserver.desktopManager.gnome.flashback.customSessions = [ - { - wmName = "xmonad"; - wmLabel = "XMonad"; - wmCommand = "${pkgs.haskellPackages.xmonad}/bin/xmonad"; - enableGnomePanel = false; - } -]; +{ + 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} @@ -105,11 +119,13 @@ Some packages that include Shell extensions, like `gnome.gpaste`, don’t have t You can install them like any other package: ```nix -environment.systemPackages = [ - gnomeExtensions.dash-to-dock - gnomeExtensions.gsconnect - gnomeExtensions.mpris-indicator-button -]; +{ + 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. @@ -137,22 +153,24 @@ You can use `dconf-editor` tool to explore which GSettings you can set. ### Example {#sec-gnome-gsettings-overrides-example} ```nix -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.Console.desktop', 'org.gnome.Nautilus.desktop'] - ''; - - extraGSettingsOverridePackages = [ - pkgs.gsettings-desktop-schemas # for org.gnome.desktop - pkgs.gnome.gnome-shell # for org.gnome.shell - ]; -}; +{ + 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.Console.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} diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.md b/nixos/modules/services/x11/desktop-managers/pantheon.md index 664bd7f31eeb..ce251ec2d394 100644 --- a/nixos/modules/services/x11/desktop-managers/pantheon.md +++ b/nixos/modules/services/x11/desktop-managers/pantheon.md @@ -6,16 +6,22 @@ Pantheon is the desktop environment created for the elementary OS distribution. All of Pantheon is working in NixOS and the applications should be available, aside from a few [exceptions](https://github.com/NixOS/nixpkgs/issues/58161). To enable Pantheon, set ```nix -services.xserver.desktopManager.pantheon.enable = true; +{ + services.xserver.desktopManager.pantheon.enable = true; +} ``` This automatically enables LightDM and Pantheon's LightDM greeter. If you'd like to disable this, set ```nix -services.xserver.displayManager.lightdm.greeters.pantheon.enable = false; -services.xserver.displayManager.lightdm.enable = false; +{ + services.xserver.displayManager.lightdm.greeters.pantheon.enable = false; + services.xserver.displayManager.lightdm.enable = false; +} ``` but please be aware using Pantheon without LightDM as a display manager will break screenlocking from the UI. The NixOS module for Pantheon installs all of Pantheon's default applications. If you'd like to not install Pantheon's apps, set ```nix -services.pantheon.apps.enable = false; +{ + services.pantheon.apps.enable = false; +} ``` You can also use [](#opt-environment.pantheon.excludePackages) to remove any other app (like `elementary-mail`). @@ -34,25 +40,28 @@ wingpanel-with-indicators.override { indicators = [ pkgs.some-special-indicator ]; -}; +} +``` +```nix switchboard-with-plugs.override { plugs = [ pkgs.some-special-plug ]; -}; +} ``` please note that, like how the NixOS options describe these as extra plugins, this would only add to the default plugins included with the programs. If for some reason you'd like to configure which plugins to use exactly, both packages have an argument for this: ```nix wingpanel-with-indicators.override { useDefaultIndicators = false; indicators = specialListOfIndicators; -}; - +} +``` +```nix switchboard-with-plugs.override { useDefaultPlugs = false; plugs = specialListOfPlugs; -}; +} ``` this could be most useful for testing a particular plug-in in isolation. |