Niri wm not starting from GDM display manager

From today my niri wm will not launch from GDM.
It will launch from terminal with default config.
It will launch from TTY1.
It was working up till yesterday.
Any assistance will be appreciated

I have solved the problem.
I had systemctl --user services set for waybar mako and swayidle. To set these up I had to set a path to their binary in nix store. So if nix updates any of these programs then the path is broken and niri wont load.
Greg

You should probably be creating these services through your NixOS configuration, so this sort of thing cant happen.

How can I set this through nixos configuration. I am new to nixos so any help will be appreciated.
Thanks

you can either use systemd user services defined at the system level, or use home manager (which has modules for swayidle / waybar). For mako, you don’t need a systemd service though, it will bind using dbus automatically.

Thanks for your reply

1 Like

I think the exact solution to your problem is to set the path in your service definitions (I read your description that you have done this already, or you enhance the NixOS provided one). With setting the path, you can avoid hard coding nix-store paths which are changing from version or build.

For example, I need some programs being available in my Waybar configuration:

systemd.user.services.waybar = {
  path = [
    pkgs.helvum
    pkgs.pwvucontrol
    pkgs.wireplumber
  ];
};

By adding this configuration, the existing service definition from NixOS will be enhanced, because Nix is merging the attribute sets.