Locale issues (Perl error)

I want my locale to be British English (en_GB.UTF-8) and in my configuration.nix I have

i18n.defaultLocale = "en_GB.UTF-8";
time.timeZone = "Europe/London"

But I’m getting errors like this when I start my shell:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_GB",
        LC_ALL = (unset),
        LC_MEASUREMENT = "en_IO.UTF-8",
        LC_TIME = "en_GB.UTF-8",
        LANG = "en_GB.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_GB.UTF-8").

What am I missing?

Also just found if I run locale I get this output:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_GB.UTF-8
LC_CTYPE="en_GB_UTF-8"
LC_NUMERIC="en_GB_UTF-8"
LC_TIME="en_GB_UTF-8"
LC_COLLATE="en_GB_UTF-8"
LC_MONETARY="en_GB_UTF-8"
LC_MESSAGES="en_GB_UTF-8"
LC_PAPER="en_GB_UTF-8"
LC_NAME="en_GB_UTF-8"
LC_ADDRESS="en_GB_UTF-8"
LC_TELEPHONE="en_GB_UTF-8"
LC_MEASUREMENT="en_GB_UTF-8"
LC_IDENTIFICATION="en_GB_UTF-8"
LC_ALL=en_GB_UTF-8
2 Likes

I have the same issue…