Attempting to run niri-session after installing it via home-manager. This works fine on a NixOS machine, but appears to fail on my Ubuntu machine.
Calling import-environment without a list of variable names is deprecated.
Environment variable $PROMPT contains control characters, importing anyway.
Failed to start niri.service: Unit niri.service not found.
Failed to start niri-shutdown.target: Unit niri-shutdown.target not found.
It looks like the niri.service file is missing on my NixOS machine as well! I would have expected to find it here ~/.config/systemd/user/ but it is not there!
So now I was wondering, why does Niri work on NixOS? It turns out I added this in and I forgot about it.
# FIXME: Kinda hacky, but this line is needed'
# to allow ly to see niri. My home-manager installs
# one too though.
programs.niri.enable = true;
This is part of the NixOS system module!
Okay so it turns out that niri.service (which is running on my NixOS system) is from this NixOS program instead of the home-manager program! But this is so weird to me because niri-session which is what I am ultimately calling on both machines needs to use the niri.service which seems to only be provided by the NixOS version of the module?
System Information
niri stable v25.08 (commit 01be0e65f4eb91a9cd624ac0b76aaeab765c7294)
cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.4 LTS"
Attempting to run
niri-sessionafter installing it via home-manager. This works fine on a NixOS machine, but appears to fail on my Ubuntu machine.It looks like the
niri.servicefile is missing on my NixOS machine as well! I would have expected to find it here~/.config/systemd/user/but it is not there!So now I was wondering, why does Niri work on NixOS? It turns out I added this in and I forgot about it.
This is part of the NixOS system module!
Okay so it turns out that niri.service (which is running on my NixOS system) is from this NixOS program instead of the home-manager program! But this is so weird to me because
niri-sessionwhich is what I am ultimately calling on both machines needs to use theniri.servicewhich seems to only be provided by the NixOS version of the module?System Information