Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions nixos/modules/programs/dconf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,24 @@ in
environment.etc = optionals (cfg.profiles != {})
(mapAttrsToList mkDconfProfile cfg.profiles);

environment.extraSetup = optionalString cfg.enable ''
if [ -d $out/share/gsettings-schemas/ ]; then
# Create the standard schemas directory
mkdir -p $out/share/glib-2.0/schemas

# symlink any schema files to the standard schema directory
for d in $out/share/gsettings-schemas/*; do
# Force symlink, in case there are duplicates
ln -fs $d/glib-2.0/schemas/*.xml $out/share/glib-2.0/schemas
done

# and compile them
if [ -w $out/share/glib-2.0/schemas ]; then
${pkgs.glib.dev}/bin/glib-compile-schemas $out/share/glib-2.0/schemas
fi
fi
'';

services.dbus.packages = [ pkgs.gnome3.dconf ];

environment.variables.GIO_EXTRA_MODULES = optional cfg.enable
Expand Down
5 changes: 3 additions & 2 deletions nixos/modules/services/x11/desktop-managers/gnome3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ in {
services.udev.packages = [ pkgs.gnome3.gnome-settings-daemon ];
systemd.packages = [ pkgs.gnome3.vino ];
services.flatpak.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
programs.dconf.enable = true;

# If gnome3 is installed, build vim for gtk3 too.
nixpkgs.config.vim.gui = "gtk3";
Expand Down Expand Up @@ -163,12 +164,12 @@ in {

services.xserver.updateDbusEnvironment = true;

environment.variables.GIO_EXTRA_MODULES = [ "${lib.getLib pkgs.gnome3.dconf}/lib/gio/modules"
"${pkgs.gnome3.glib-networking.out}/lib/gio/modules"
environment.variables.GIO_EXTRA_MODULES = [ "${pkgs.gnome3.glib-networking.out}/lib/gio/modules"
"${pkgs.gnome3.gvfs}/lib/gio/modules" ];
environment.systemPackages = pkgs.gnome3.corePackages ++ cfg.sessionPath
++ (removePackagesByName pkgs.gnome3.optionalPackages config.environment.gnome3.excludePackages) ++ [
pkgs.xdg-user-dirs # Update user dirs as described in http://freedesktop.org/wiki/Software/xdg-user-dirs/
pkgs.gnome3.mutter # Give eg. gnome-control-center access to schema
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, mutter was required by g-c-c for keyboard panel, not schemas.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It fetches (and sets) the keybindings from mutters schema. I can make the comment explicit that it's the keyboard panel functionality that require them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right. The keybindings XML files point to schemas. I think I have somewhere g-c-c patch that adds schemafile argument to KeyListEntries element from the time I wanted to get rid of sessionPath.

];

# Use the correct gnome3 packageSet
Expand Down