Sucklesss packages not working due to wrong locale setting

when i run st, it says

XOpenIM failed. Could not open input device.

I have this in my configuration.nix:

i18n.extraLocaleSettings = {
LC_NAME = “en_IN”;
LC_PAPER = “en_IN”;
LC_TIME = “en_IN”;
LC_ALL = “en_IN”;

If I set LC_ALL to en_IN.utf8 by export LC_ALL="en_IN.uf8" , it runs fine for that bash session.
Is there a way to set this in nix config?
Also i cannot set this value in configuration.nix because it gives Error: Unsupported locale detected.

You might be looking for libc locale: NixOS Search

Ok, but how do i specify it which locale to use?
what should i write in nix config?
this doesnt work:

i18n.glibcLocales = lib.hiPrio (pkgs.buildPackages.glibcLocales.override {
allLocales = lib.any (x: x == “all”) config.i18n.supportedLocales;
locales = config.i18n.supportedLocales;

Solved it by adding this to my configuration.nix:

i18n.extraLocaleSettings.LC_CTYPE = “en_US.utf8”

1 Like