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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/gnome3: get keyboard layout(s) from xkb #33022

Closed
wants to merge 1 commit into from

Conversation

fahadsadah
Copy link
Contributor

Motivation for this change

GNOME3 defaults to a US keyboard layout, with the user being able to configure this in the Settings dialog. Deleting the default value for keyboard layout makes it instead use the xkb default layout (source), which the NixOS manual says to set in configuration.nix (and is presumably where every other desktop environment / window manager gets their choice of keyboard layout from 馃槖)

GNOME's Wayland compositor still uses xkb, so this change doesn't depend on Xorg

I tried this change on my own system and found that GNOME had preserved the previous default setting for all of my users. I think this is probably ideal - current users see no change (some may not have set layout in configuration.nix, but only in gnome-control-center), whereas for new users the keyboard layout setting in configuration.nix works out-of-the-box (but gnome-control-center can still be used to change keyboard layout if desired)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@jtojnar jtojnar added the 6.topic: GNOME GNOME desktop environment and its underlying platform label Dec 24, 2017
@jtojnar
Copy link
Contributor

jtojnar commented Dec 24, 2017

I am pretty sure GNOME 3 defaulting to US layout was a bug caused by missing xkb configuration file which was fixed in #32203.

The schemas already use [] as the default value, so overriding the option will definitely have no effect.

@fahadsadah
Copy link
Contributor Author

Thanks, that does make a lot of sense. Oops.

@fahadsadah fahadsadah closed this Dec 24, 2017
@fahadsadah fahadsadah deleted the patch-2 branch January 1, 2018 21:45
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 10.rebuild-linux: 0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants