A few begginer questions

Been using NixOS for a bit and so far I’m enjoying it, I’ve got a few questions I’d like some help with:

  • How does one decoratively set the desktop background? I couldn’t find anything quite related to it on the option search (there’s something for lightdm, but I assume thats for the lockscreen)
  • I consistently get the following error since I mistyped the locale while installing NixOS and now I cannot get rid of it despite setting i18n.defaultLocale = "en_US.UTF-8";, why does this setting persist despite the new value?
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_CTYPE = "C.UTF-8",
	LANG = "en_EN.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
  • For using a package that is still in a Github pull request I’m currently using fetchTarall like so, is this a sane way of doing it?
let
  easyeffects_v7 = (import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/13c891efa5309d1555fda72132ab4806609aff17.tar.gz") { config = config.nixpkgs.config; }).easyeffects;
in
{
users.users.${user} = {
  packages = with pkgs; [ easyeffects_v7 ];
}
}
  • Also related, how does the PR process go before a new version gets merged? Can I aid in testing?
  1. What desktop environment are you using?
  2. Have you rebooted since fixing it? What’s in /etc/locale.conf and what does locale print out?
  3. Seems OK, can also look into overlays
  4. Definitely, there’s a chapter on reviewing PRs in the manual and you can run nixpkgs-review on the PR number as well

(Same person as above, just not on a temp account made in a rush)

  1. I’m using KDE Plasma (with SDDM + X11).
  2. Yeah, I’ve tried any and all combinations of switching, rebooting and logging out to no avail.
$ locale
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_EN.UTF-8
LC_CTYPE=C.UTF-8
LC_NUMERIC="en_EN.UTF-8"
LC_TIME="en_EN.UTF-8"
LC_COLLATE="en_EN.UTF-8"
LC_MONETARY="en_EN.UTF-8"
LC_MESSAGES="en_EN.UTF-8"
LC_PAPER="en_EN.UTF-8"
LC_NAME="en_EN.UTF-8"
LC_ADDRESS="en_EN.UTF-8"
LC_TELEPHONE="en_EN.UTF-8"
LC_MEASUREMENT="en_EN.UTF-8"
LC_IDENTIFICATION="en_EN.UTF-8"
LC_ALL=
$ cat /etc/locale.conf 
LANG=en_US.UTF-8

What about ls -l /etc/locale.conf and (where it presumably symlinks to) ls -l /etc/static/locale.conf?

$ ls -l /etc/locale.conf 
lrwxrwxrwx 1 root root 23 Nov 27 02:52 /etc/locale.conf -> /etc/static/locale.conf

$ ls -l /etc/static/locale.conf 
lrwxrwxrwx 1 root root 55 Jan  1  1970 /etc/static/locale.conf -> /nix/store/jrjhjn7qk58bfbng4yiv8x8j6qr470rr-locale.conf

For the wallpaper, it seems there’s no NixOS option available for KDE, and apparently it’s a bit complicated: https://www.reddit.com/r/kde/comments/65pmhj/change_wallpaper_from_terminal/

You may be able to make something work by combining some of the suggestions in that Reddit thread with NixOS activationScripts options.

At that point all I can think is that you set that variable in one of your bash initialization scripts. Any chance you copied those over from a non-NixOS system or such?

I do not, everything in this installation is (as of now) managed through the configuration.nix file. The option is set directly at the root file (configuration.nix, not an import) hence why I’m dumbfounded at what the source of the issue could be.

The only thing that may be an issue is that my config is symlinked to /etc from my home directory, but I highly doubt that’s it.

Weirdly enough, it’s my user’s env vars that are stuck, the root user ones seem to be fine and update when the config does.

» locale 
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_EN.UTF-8
LC_CTYPE=C.UTF-8
LC_NUMERIC="en_EN.UTF-8"
LC_TIME="en_EN.UTF-8"
LC_COLLATE="en_EN.UTF-8"
LC_MONETARY="en_EN.UTF-8"
LC_MESSAGES="en_EN.UTF-8"
LC_PAPER="en_EN.UTF-8"
LC_NAME="en_EN.UTF-8"
LC_ADDRESS="en_EN.UTF-8"
LC_TELEPHONE="en_EN.UTF-8"
LC_MEASUREMENT="en_EN.UTF-8"
LC_IDENTIFICATION="en_EN.UTF-8"
LC_ALL=

» sudo -i          
nixos# locale
LANG=en_US.UTF-8
LC_CTYPE=C.UTF-8
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Have you double checked for an accidental ~/.bash_profile or ~/.bashrc, or even a ~/.profile or a ~/.xsession or something? If you have, has sddm been accidentally configured to set your locale? Can you reproduce this if you sign into a tty instead?

1 Like

Forgot to consider home-manager and its env setup was a possible issue, re-setting it up fixed that, thanks!

Hi !
I am facing the exact same problem. Could you elaborate on how you fixed it ?

Here is the output of the locale command for my user and root accounts.

[gaetan@framework:~]$ locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

[gaetan@framework:~]$ sudo su

[root@framework:/home/gaetan]# locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

If you’re talking about the misconfigured locale settings, try setting some other language and then your preferred one via your DE’s configuration tool. That fixed both Plasma and GNOME for me (along with checking for other sources of env var setting)