Nixpkgs: Waybar 0.9.3 looks for it's configuration in the wrong directory

Created on 29 Sep 2020  路  6Comments  路  Source: NixOS/nixpkgs

Describe the bug
Waybar looks for config in //nix/store/blabla-waybar-0.9.3/etc/xdg/waybar/config. Notice the / prefix. I would like waybar to source it's config file from /etc/xdg/waybar/config. 0.9.1 version is clean from this behavior.

To Reproduce
Steps to reproduce the behavior:

  1. Have waybar 0.9.3
  2. Have your config saved in /etc/xdg/waybar/config
  3. Start waybar.

Expected behavior
It sources config from /etc/xdg/waybar/config.

Additional context
There was a very useful discussion in Alexays/Waybar#714.

Notify maintainers
@FlorianFranzen @minijackson @Synthetica9

Metadata

> nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.05 MiB download, 0.28 MiB unpacked):
  /nix/store/rlknkw60sngvky1rkrdws0qik3scjcln-bash-interactive-4.4-p23-dev
copying path '/nix/store/rlknkw60sngvky1rkrdws0qik3scjcln-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 5.8.11, NixOS, 20.09beta514.a9226f2b3a5 (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.7`
 - channels(kazimazi): `""`
 - channels(root): `"nixos-20.09beta514.a9226f2b3a5, nixos-stable-20.03.3021.5659cb448e9, nixos-unstable-21.03pre244416.daaa0e33505"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: waybar
# a list of nixos modules affected by the problem
module:
bug

All 6 comments

Sorry, but I have no idea what waybar is doing or what it is :sweat_smile:

Ooops I @ the wrong person.

Thanks for the report! I wouldn't have found that by myself.

This is a hard question, though. We cannot simply set -Dsysconfdir=/etc in mesonFlags because it installs a default configuration and will try to copy in /etc/xdg/waybar.

From my point of view, as a package manager, I'm not sure we should patch waybar to read from /etc/xdg/waybar because it will prevent users from accessing the default waybar configuration.

What could solve our problem is to change the config loading mechanism from just reading <prefix>/etc/xdg/waybar to reading both <prefix>/etc/xdg/waybar and /etc/xdg/waybar, the latter having a higher priority. This seems to me like a beneficial change for people outside of nix/nixos, so I'd suggest asking the waybar devs, and maybe take action once we have their responses.

Added a PR that should hopefully be a fix for your needs @Kazimazi

This should now be fixed when the next version of waybar comes in

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

spacekitteh picture spacekitteh  路  3Comments

langston-barrett picture langston-barrett  路  3Comments

chris-martin picture chris-martin  路  3Comments

matthiasbeyer picture matthiasbeyer  路  3Comments

rzetterberg picture rzetterberg  路  3Comments