Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dconf-editor: Respect NIX_GSETTINGS_OVERRIDES_DIR variable #166211

Merged
merged 2 commits into from
Mar 30, 2022

Conversation

jtojnar
Copy link
Member

@jtojnar jtojnar commented Mar 29, 2022

Description of changes

We patch GLib to recognize NIX_GSETTINGS_OVERRIDES_DIR environment variable as a high priority source of settings schemas (#31683). This is used by NixOS modules for desktop environments like GNOME to set default values for stuff like background image.

Since dconf-editor uses custom GSettingsSchemaSource, it bypassed that patch, leading to the dconf-editor showing different values from what other apps using the GLib’s default source saw.

Let’s mirror our GLib patch in dconf-editor to fix that.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

We patch GLib to recognize NIX_GSETTINGS_OVERRIDES_DIR
environment variable as a high priority source of settings
schemas. This is used by NixOS modules for desktop environments
like GNOME to set default values for stuff like background image.

Since dconf-editor uses custom GSettingsSchemaSource,
it bypassed that patch, leading to the dconf-editor
showing different values from what other apps
using the GLib’s default source saw.

Let’s mirror our GLib patch in dconf-editor to fix that.
@jtojnar jtojnar requested a review from hedning as a code owner March 29, 2022 09:08
@github-actions github-actions bot added the 6.topic: GNOME GNOME desktop environment and its underlying platform label Mar 29, 2022
@jtojnar
Copy link
Member Author

jtojnar commented Mar 29, 2022

dconf-editor from master

image

dconf-editor from this branch

image

This one correctly uses the background I set in my config.

@ofborg ofborg bot requested review from dasj19 and amaxine March 29, 2022 09:23
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Mar 29, 2022
bobby285271 added a commit to bobby285271/nixos-config that referenced this pull request Mar 30, 2022
@bobby285271
Copy link
Member

@ofborg build gnome.dconf-editor

@bobby285271
Copy link
Member

Both patches LGTM.

@jtojnar jtojnar merged commit 645796c into NixOS:master Mar 30, 2022
@jtojnar jtojnar deleted the dconf-editor-nix-schema-var branch March 30, 2022 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: GNOME GNOME desktop environment and its underlying platform 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants