mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-11-24 13:45:57 +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
|
NOTE: This page only applies to the flake package. You can safely skip this if
|
||||||
you use the Nixpkgs package.
|
you use the Nixpkgs package.
|
||||||
|
|
||||||
Hyprland is not built by Hydra and cached in `cache.nixos.org`, like the rest
|
The Hyprland flake is not built by Hydra, so it is not cached in
|
||||||
of the Nixpkgs packages.
|
[cache.nixos.org], like the rest of Nixpkgs.
|
||||||
|
|
||||||
Instead of requiring you to build Hyprland (and its dependencies, which may
|
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
|
include `mesa`, `ffmpeg`, etc), we provide a Cachix cache that you can add to
|
||||||
your Nix configuration.
|
your Nix configuration.
|
||||||
|
|
||||||
The [Hyprland Cachix](https://app.cachix.org/cache/hyprland) exists to cache the
|
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 >}}
|
{{< hint >}}
|
||||||
In order for Nix to take advantage of the cache, it has to be enabled **before**
|
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 >}}
|
{{< /hint >}}
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
|
@ -34,3 +34,4 @@ Doing so will make the cache useless, since you're building from a different
|
||||||
Nixpkgs commit.
|
Nixpkgs commit.
|
||||||
{{< /hint >}}
|
{{< /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
|
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).
|
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
|
```sh
|
||||||
nix profile install github:guibou/nixGL --impure
|
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
|
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
|
You can override the package through `.override` or `.overrideAttrs`. This
|
||||||
easily achievable through [NixOS](../Hyprland-on-NixOS) or [Home Manager](../Hyprland-on-Home-Manager).
|
is easily achievable on [NixOS](../Hyprland-on-NixOS) or
|
||||||
|
[Home Manager](../Hyprland-on-Home-Manager).
|
||||||
|
|
||||||
## Package options
|
## Package options
|
||||||
|
|
||||||
|
@ -11,7 +12,7 @@ can be changed by setting the appropriate option to `true`/`false`.
|
||||||
```nix
|
```nix
|
||||||
(pkgs.hyprland.override { # or inputs.hyprland.packages.${pkgs.system}.hyprland
|
(pkgs.hyprland.override { # or inputs.hyprland.packages.${pkgs.system}.hyprland
|
||||||
enableXWayland = true;
|
enableXWayland = true;
|
||||||
nvidiaPatches = false;
|
enableNvidiaPatches = false;
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -20,10 +21,8 @@ can be changed by setting the appropriate option to `true`/`false`.
|
||||||
```nix
|
```nix
|
||||||
programs.hyprland = { # or wayland.windowManager.hyprland
|
programs.hyprland = { # or wayland.windowManager.hyprland
|
||||||
enable = true;
|
enable = true;
|
||||||
xwayland = {
|
xwayland.enable = true;
|
||||||
enable = true;
|
enableNvidiaPatches = false;
|
||||||
};
|
|
||||||
nvidiaPatches = false;
|
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -43,19 +42,19 @@ See [XWayland](../../Configuring/XWayland).
|
||||||
Nvidia is notorious for not working by default with wlroots. That's why we
|
Nvidia is notorious for not working by default with wlroots. That's why we
|
||||||
patch wlroots.
|
patch wlroots.
|
||||||
|
|
||||||
In the NixOS and Home Manager modules, you can enable the Nvidia patches using
|
In the NixOS and Home Manager modules, you can enable the
|
||||||
`programs.hyprland.nvidiaPatches` and `wayland.windowManager.hyprland.nvidiaPatches`,
|
Nvidia patches using `programs.hyprland.enableNvidiaPatches` and
|
||||||
respectively.
|
`wayland.windowManager.hyprland.enableNvidiaPatches`, respectively.
|
||||||
|
|
||||||
## Using Nix repl
|
## Using Nix repl
|
||||||
|
|
||||||
If you're using Nix (and not NixOS or Home Manager) and you want to override,
|
If you're using Nix (and not NixOS or Home Manager) and you want to override,
|
||||||
you can do it like this
|
you can do it like this
|
||||||
|
|
||||||
```console
|
```nix
|
||||||
$ nix repl
|
$ nix repl
|
||||||
nix-repl> :lf "github:hyprwm/Hyprland"
|
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.
|
Then you can run Hyprland from the built path.
|
||||||
|
|
Loading…
Reference in a new issue