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

NixOS install first-run issue #1945

Closed
abctaylor opened this issue Jul 28, 2020 · 7 comments
Closed

NixOS install first-run issue #1945

abctaylor opened this issue Jul 28, 2020 · 7 comments
Assignees

Comments

@abctaylor
Copy link

Tell me straight away if this is a PEBCAK issue :)

Running i3status -c ~/.config/i3/i3status.conf works great and I get a rendering:
image
image

I understand I should be able to freely swap in py3status:
py3status -c ~/.config/i3/i3status.conf
image

Could more information be added to the error output for users?

Separeately for my own sake, do you see any obvious mistake I'm making here? I'm using the NixOS package python37Packages.py3status

@ultrabug
Copy link
Owner

Hello @abctaylor

This FileNotFoundError on the config parser means that somehow py3status was not able to find your config file

Are you sure a typo or something is not there? could you try an absolute path without the ~ just in case ?

@ultrabug
Copy link
Owner

On a second thought, if that's not a simple path typo or path extension problem maybe it's looking for a codec that you don't have; make sure your locales are built okay please

@abctaylor
Copy link
Author

Thanks @ultrabug - an absolute path produces the same error. Do you mind elaborating what you mean by locales built okay?

Might this be related to having an en_GB locale instead of en_US?

@ultrabug
Copy link
Owner

@abctaylor that means that maybe your system is missing some locales and that means that our file encoding detection code fails to find the codec of your config file

Check the /etc/locale.conf file and run locale-gen please? (I guess they exist on NixOS)

We are using codecs.open when this fails for you: https://docs.python.org/3/library/codecs.html

@ultrabug ultrabug self-assigned this Aug 11, 2020
@ultrabug
Copy link
Owner

Also, I'm allowing myself to ping @thiagokokada since he's the only NixOS user I know of

Thiago, forgive me: if those pings are not welcomed please let me know

@thiagokokada
Copy link
Contributor

thiagokokada commented Aug 20, 2020

No problem @ultrabug.

I can't say I ever had this issue, but it is quite sometime since the last time I used py3status.

Anyway, I tried to install just to test here:

$ nix-env -iA nixpkgs.python37Packages.py3status
$ nix-env -iA nixos.i3status # needed by tztime module
$ cat i3status.conf                                                   
order += "tztime local"
tztime local {
        format = "%Y-%m-%d %H:%M:%S"
        hide_if_equals_localtime = true
}
$ py3status -c i3status.conf
{"version": 1, "click_events": true, "stop_signal": 20}
[[]
,[{"full_text": "2020-08-20 10:10:35", "name": "tztime", "instance": "local"}]
,[{"full_text": "2020-08-20 10:10:36", "name": "tztime", "instance": "local"}]
,[{"full_text": "2020-08-20 10:10:37", "name": "tztime", "instance": "local"}]
^C

So it works.

Running py3status without any parameters seems to give the same results as @abctaylor, this makes sense since my config file is not in correct location.

Check the /etc/locale.conf file and run locale-gen please? (I guess they exist on NixOS)

To set locale in NixOS you would set something like this in /etc/nixos/configuration.nix:

i18n.defaultLocale = "en_US.UTF-8";

But I don't think this is the issue.

@ultrabug
Copy link
Owner

ultrabug commented Sep 6, 2020

Thanks a lot Thiago

@abctaylor, since I have nothing else to elaborate / test I don't know what more can be done on my part here I'm afraid... did you solve it somehow since then? I will close the issue after 10 days if nothing much shows up.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants