How can I install Niri as a home-manager module using flakes?

I’d like to install the window manager Niri. Niri has a NixOS flake that makes it easy to install, in theory. The flake provides a home manager module which I imagine I could use with home-manager, somehow.

My system uses a flake which calls home-manager, which is all configured here in my home.nix.

The thing is, I’m relatively new to flakes, and I’m still a little unclear all these pieces fit together, and how to access the home manager module for Niri, given my configuration. How can I pass the right variables and so on, to the right modules, such that I can use the Niri home-manager module?

outputs is a function of inputs. In your case you are passing a reference to niri flake as niri argument. Using that niri argument you can refer to whatever outputs it has.

Looks like you should just add niri.homeModules.niri inside home manager’s imports in your flake.nix (here-ish). This will pull in niri’s module options and allow you to configure them.

2 Likes