mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-11-14 17:25:59 +01:00
Nix: update option names
This commit is contained in:
parent
756861e71d
commit
20f15795bd
3 changed files with 18 additions and 18 deletions
|
@ -1,19 +1,19 @@
|
|||
NOTE: This page only applies to the flake package. You can safely skip this if
|
||||
you use the Nixpkgs package.
|
||||
|
||||
Hyprland is not built by Hydra and cached in `cache.nixos.org`, like the rest
|
||||
of the Nixpkgs packages.
|
||||
The Hyprland flake is not built by Hydra, so it is not cached in
|
||||
[cache.nixos.org], like the rest of Nixpkgs.
|
||||
|
||||
Instead of requiring you to build Hyprland (and its dependencies, which may
|
||||
include `mesa`, `ffmpeg`, etc), we provide a Cachix cache that you can add to
|
||||
your Nix configuration.
|
||||
|
||||
The [Hyprland Cachix](https://app.cachix.org/cache/hyprland) exists to cache the
|
||||
`hyprland` packages and any dependencies not found in `cache.nixos.org`.
|
||||
`hyprland` packages and any dependencies not found in [cache.nixos.org].
|
||||
|
||||
{{< hint >}}
|
||||
In order for Nix to take advantage of the cache, it has to be enabled **before**
|
||||
enabling the Hyprland flake package.
|
||||
using the Hyprland flake package.
|
||||
{{< /hint >}}
|
||||
|
||||
```nix
|
||||
|
@ -34,3 +34,4 @@ Doing so will make the cache useless, since you're building from a different
|
|||
Nixpkgs commit.
|
||||
{{< /hint >}}
|
||||
|
||||
[cache.nixos.org]: https://cache.nixos.org
|
||||
|
|
|
@ -32,13 +32,13 @@ nix profile install github:hyprwm/Hyprland
|
|||
Since you're using Hyprland outside of NixOS, it won't be able to find graphics
|
||||
drivers. To get around that, you can use [nixGL](https://github.com/guibou/nixGL).
|
||||
|
||||
First, install it, in the same manner you installed Hyprland:
|
||||
First, install it:
|
||||
|
||||
```sh
|
||||
nix profile install github:guibou/nixGL --impure
|
||||
```
|
||||
|
||||
Impure is needed due to `nixGL`'s reliance on hardware information.
|
||||
`--impure` is needed due to `nixGL`'s reliance on hardware information.
|
||||
|
||||
From now on, you can run Hyprland by invoking it with nixGL
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
You can override the package through `.override` or `.overrideAttrs`. This is
|
||||
easily achievable through [NixOS](../Hyprland-on-NixOS) or [Home Manager](../Hyprland-on-Home-Manager).
|
||||
You can override the package through `.override` or `.overrideAttrs`. This
|
||||
is easily achievable on [NixOS](../Hyprland-on-NixOS) or
|
||||
[Home Manager](../Hyprland-on-Home-Manager).
|
||||
|
||||
## Package options
|
||||
|
||||
|
@ -11,7 +12,7 @@ can be changed by setting the appropriate option to `true`/`false`.
|
|||
```nix
|
||||
(pkgs.hyprland.override { # or inputs.hyprland.packages.${pkgs.system}.hyprland
|
||||
enableXWayland = true;
|
||||
nvidiaPatches = false;
|
||||
enableNvidiaPatches = false;
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -20,10 +21,8 @@ can be changed by setting the appropriate option to `true`/`false`.
|
|||
```nix
|
||||
programs.hyprland = { # or wayland.windowManager.hyprland
|
||||
enable = true;
|
||||
xwayland = {
|
||||
enable = true;
|
||||
};
|
||||
nvidiaPatches = false;
|
||||
xwayland.enable = true;
|
||||
enableNvidiaPatches = false;
|
||||
};
|
||||
```
|
||||
|
||||
|
@ -43,19 +42,19 @@ See [XWayland](../../Configuring/XWayland).
|
|||
Nvidia is notorious for not working by default with wlroots. That's why we
|
||||
patch wlroots.
|
||||
|
||||
In the NixOS and Home Manager modules, you can enable the Nvidia patches using
|
||||
`programs.hyprland.nvidiaPatches` and `wayland.windowManager.hyprland.nvidiaPatches`,
|
||||
respectively.
|
||||
In the NixOS and Home Manager modules, you can enable the
|
||||
Nvidia patches using `programs.hyprland.enableNvidiaPatches` and
|
||||
`wayland.windowManager.hyprland.enableNvidiaPatches`, respectively.
|
||||
|
||||
## Using Nix repl
|
||||
|
||||
If you're using Nix (and not NixOS or Home Manager) and you want to override,
|
||||
you can do it like this
|
||||
|
||||
```console
|
||||
```nix
|
||||
$ nix repl
|
||||
nix-repl> :lf "github:hyprwm/Hyprland"
|
||||
nix-repl> :bl outputs.packages.x86_64-linux.hyprland.override {nvidiaPatches = true;} # option = value
|
||||
nix-repl> :bl outputs.packages.x86_64-linux.hyprland.override {enableNvidiaPatches = true;} # option = value
|
||||
```
|
||||
|
||||
Then you can run Hyprland from the built path.
|
||||
|
|
Loading…
Reference in a new issue