2024-02-20 21:16:07 +01: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 14:30:40 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< callout title=Note >}}
|
2023-12-14 19:02:45 +01:00
|
|
|
|
|
|
|
- _(Required) NixOS Module_: enables critical components needed to run Hyprland
|
|
|
|
properly
|
|
|
|
- _(Optional) Home-manager module_: lets you declaratively configure Hyprland
|
2024-02-20 21:16:07 +01:00
|
|
|
|
|
|
|
{{< /callout >}}
|
2023-02-14 14:30:40 +01:00
|
|
|
|
2023-07-17 18:14:43 +02:00
|
|
|
## NixOS module
|
2022-12-18 14:20:19 +01:00
|
|
|
|
2023-12-14 19:02:45 +01:00
|
|
|
The module is now upstreamed into Nixpkgs, which means all you need in your
|
|
|
|
configuration is:
|
2022-08-12 20:46:36 +02:00
|
|
|
|
2023-07-17 18:14:43 +02:00
|
|
|
```nix
|
|
|
|
{config, pkgs, ...}: {
|
|
|
|
programs.hyprland.enable = true;
|
|
|
|
# Optional, hint electron apps to use wayland:
|
|
|
|
# environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
|
|
|
}
|
|
|
|
```
|
2023-02-14 14:30:40 +01:00
|
|
|
|
2023-12-14 19:02:45 +01:00
|
|
|
Note that the command to run hyprland is `Hyprland` (with a capital `H`) and not
|
|
|
|
`hyprland`.
|
2023-08-25 18:14:29 +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 14:30:40 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
For other NixOS options, see [Hyprland on NixOS](./hyprland-on-nixos).
|
2022-09-09 16:53:49 +02:00
|
|
|
|
2023-07-17 18:14:43 +02:00
|
|
|
## Home-manager module
|
2022-12-09 13:38:13 +01:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
Read [Hyprland on Home Manager](./hyprland-on-home-manager).
|
2023-11-27 12:36:33 +01:00
|
|
|
|
2023-12-14 19:02:45 +01: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
|
|
|
|
[here](https://github.com/spikespaz/hyprland-nix).
|
|
|
|
|
2023-11-27 12:36:33 +01:00
|
|
|
## Options and overrides
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
Read [Options & Overrides](./options--overrides).
|