This document details the issue I faced with enabling dynamic workspaces in GNOME on NixOS and how I resolved it using `dconf` directly.
When trying to enable dynamic workspaces in GNOME on NixOS using the `gsettings` command, I encountered the following error:
No such schema “org.gnome.mutter”
This indicated that the `org.gnome.mutter` schema was not available on my system, preventing me from enabling dynamic workspaces through the usual method.
I tried several approaches to resolve this issue:
- Ensuring GNOME was fully installed: I updated my `/etc/nixos/configuration.nix` to include the necessary GNOME components and rebuilt my system.
{ config, pkgs, ... }:
{
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
environment.systemPackages = with pkgs; [
gnome3.gnome-tweaks
dconf
gnome3.gnome-shell
];
}- Rebooting the system: After making the configuration changes, I rebooted my system to ensure all changes took effect.
- Verifying GNOME session: I checked to ensure I was logged into a GNOME session using the following command:
echo $XDG_CURRENT_DESKTOPDespite these steps, the `gsettings` command still did not recognize the `org.gnome.mutter` schema.
Given the persistent issue with `gsettings`, I decided to use `dconf` directly to enable dynamic workspaces.
- Install `dconf` CLI tool:
nix-env -iA nixos.dconf- Set dynamic workspaces using `dconf`:
dconf write /org/gnome/mutter/dynamic-workspaces trueThis command successfully enabled dynamic workspaces in GNOME, resolving the issue.
By using the `dconf` CLI tool, I was able to work around the limitations with `gsettings` and enable dynamic workspaces in GNOME on NixOS. This experience highlighted the importance of having alternative tools and methods for configuring system settings when the primary tools do not work as expected.