Nix/Home-Manager: clarify setting HM package to null on NixOS (#963)

Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
This commit is contained in:
Chi 2025-02-04 16:49:56 +00:00 committed by GitHub
parent 59d4de63fb
commit d88f6773eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -203,6 +203,26 @@ Example configuration:
}
```
### Using the Home-Manager module with NixOS
If you want to use the Home Manager module while using the Hyprland package you've
defined in your NixOS module, you can now do so as long as you're running
[Home Manager `5dc1c2e40410f7dabef3ba8bf4fdb3145eae3ceb`](https://github.com/nix-community/home-manager/commit/5dc1c2e40410f7dabef3ba8bf4fdb3145eae3ceb)
or later by setting your `package` and `portalPackage` to `null`.
```nix {filename="home.nix"}
wayland.windowManager.hyprland = {
enable = true;
# set the Hyprland and XDPH packages to null to use the ones from the NixOS module
package = null;
portalPackage = null;
};
```
Make sure **not** to mix versions of Hyprland and XDPH.
If your NixOS config uses Hyprland from the flake, you should also use XDPH from the flake.
If you set the Home Manager Hyprland module package to `null`, you should also set the XDPH package to `null`.
### Programs don't work in systemd services, but do on the terminal
This problem is related to systemd not importing the environment by default. It