2024-02-20 22:16:07 +02:00
|
|
|
---
|
|
|
|
weight: 7
|
|
|
|
title: Nix
|
|
|
|
---
|
|
|
|
|
2023-07-17 18:14:43 +02:00
|
|
|
To install Hyprland on NixOS, we provide a NixOS and a Home Manager module.
|
2023-02-14 15:30:40 +02:00
|
|
|
|
2024-02-20 22:16:07 +02:00
|
|
|
{{< callout title=Note >}}
|
2023-12-14 20:02:45 +02:00
|
|
|
|
2024-06-28 20:53:47 +00:00
|
|
|
- _**(Required)** NixOS Module_: enables critical components needed to run
|
|
|
|
Hyprland properly
|
|
|
|
- _Without this, you may have issues with XDG Portals, or missing session
|
|
|
|
files in your Display Manager._
|
|
|
|
- _(Optional) Home Manager module_: lets you configure Hyprland declaratively
|
|
|
|
through Home Manager.
|
|
|
|
- _This module configures Hyprland and adds it to your user's `$PATH`, but
|
|
|
|
does not make certain system-level changes such as adding a desktop session
|
|
|
|
file for your display manager. This is handled by the NixOS module once you
|
|
|
|
enable it._
|
2024-02-20 22:16:07 +02:00
|
|
|
|
|
|
|
{{< /callout >}}
|
2023-02-14 15:30:40 +02:00
|
|
|
|
2023-07-17 18:14:43 +02:00
|
|
|
## NixOS module
|
2022-12-18 15:20:19 +02:00
|
|
|
|
2024-11-06 22:55:14 +02:00
|
|
|
```nix {filename="configuration.nix"}
|
2024-06-23 01:46:01 +03:00
|
|
|
{
|
2023-07-17 18:14:43 +02:00
|
|
|
programs.hyprland.enable = true;
|
|
|
|
# Optional, hint electron apps to use wayland:
|
|
|
|
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
|
|
|
}
|
|
|
|
```
|
2023-02-14 15:30:40 +02:00
|
|
|
|
2023-07-17 18:14:43 +02:00
|
|
|
For more options, see
|
|
|
|
[module options](https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=hyprland).
|
2023-02-14 15:30:40 +02:00
|
|
|
|
2024-03-17 14:44:39 +02:00
|
|
|
For other NixOS options, see [Hyprland on NixOS](./Hyprland-on-NixOS).
|
2022-09-09 17:53:49 +03:00
|
|
|
|
2024-08-13 23:13:20 +03:00
|
|
|
## Home Manager module
|
2022-12-09 14:38:13 +02:00
|
|
|
|
2024-03-17 14:44:39 +02:00
|
|
|
Read [Hyprland on Home Manager](./Hyprland-on-Home-Manager).
|
2023-11-27 13:36:33 +02:00
|
|
|
|
2023-12-14 20:02:45 +02:00
|
|
|
For the adventurous, [@spikespaz](https://github.com/spikespaz) has made a
|
|
|
|
Hyprland module that can be used in Home Manager and NixOS. It can be found
|
2024-11-14 15:06:30 +03:00
|
|
|
[here](https://github.com/hyprland-community/hyprnix).
|
2023-12-14 20:02:45 +02:00
|
|
|
|
2023-11-27 13:36:33 +02:00
|
|
|
## Options and overrides
|
|
|
|
|
2024-03-17 14:44:39 +02:00
|
|
|
Read [Options & Overrides](./Options-Overrides).
|