2024-02-20 21:16:07 +01:00
|
|
|
---
|
|
|
|
title: Options & Overrides
|
|
|
|
---
|
|
|
|
|
2024-06-23 00:46:01 +02:00
|
|
|
You can override the package through the `.override` or `.overrideAttrs`
|
|
|
|
mechanisms. This is easily achievable on [NixOS](../Hyprland-on-NixOS) or
|
2024-03-17 13:44:39 +01:00
|
|
|
[Home Manager](../Hyprland-on-Home-Manager).
|
2022-12-18 14:20:19 +01:00
|
|
|
|
|
|
|
## Package options
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
These are the default options that the Hyprland package is built with. These can
|
|
|
|
be changed by setting the appropriate option to `true`/`false`.
|
2022-12-18 14:20:19 +01:00
|
|
|
|
|
|
|
### Package
|
|
|
|
|
|
|
|
```nix
|
2024-06-23 00:46:01 +02:00
|
|
|
(pkgs.hyprland.override { # or inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland
|
2023-11-27 12:36:33 +01:00
|
|
|
enableXWayland = true; # whether to enable XWayland
|
|
|
|
legacyRenderer = false; # whether to use the legacy renderer (for old GPUs)
|
|
|
|
withSystemd = true; # whether to build with systemd support
|
2022-12-18 14:20:19 +01:00
|
|
|
})
|
|
|
|
```
|
|
|
|
|
|
|
|
### NixOS & HM modules
|
|
|
|
|
|
|
|
```nix
|
2024-06-23 00:46:01 +02:00
|
|
|
{
|
|
|
|
programs.hyprland = { # or wayland.windowManager.hyprland
|
|
|
|
enable = true;
|
|
|
|
xwayland.enable = true;
|
|
|
|
};
|
|
|
|
}
|
2022-12-18 14:20:19 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
## Options descriptions
|
|
|
|
|
|
|
|
### XWayland
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
XWayland is enabled by default in the Nix package. You can disable it either in
|
|
|
|
the package itself, or through the module options.
|
2022-12-18 14:20:19 +01:00
|
|
|
|
|
|
|
## Using Nix repl
|
|
|
|
|
|
|
|
If you're using Nix (and not NixOS or Home Manager) and you want to override,
|
2024-04-21 16:35:48 +02:00
|
|
|
you can do it like this:
|
2022-12-18 14:20:19 +01:00
|
|
|
|
2023-08-26 18:31:56 +02:00
|
|
|
```nix
|
2022-12-18 14:20:19 +01:00
|
|
|
$ nix repl
|
2024-05-05 14:56:59 +02:00
|
|
|
nix-repl> :lf git+https://github.com/hyprwm/Hyprland?submodules=1
|
2023-11-27 12:36:33 +01:00
|
|
|
nix-repl> :bl outputs.packages.x86_64-linux.hyprland.override { /* flag here */ }
|
2022-12-18 14:20:19 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
Then you can run Hyprland from the built path.
|