From 20f15795bd3edf091c16712e2125a41c3dc08f7d Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sat, 26 Aug 2023 19:31:56 +0300 Subject: [PATCH] Nix: update option names --- pages/Nix/Cachix.md | 9 +++++---- pages/Nix/Hyprland on other distros.md | 4 ++-- pages/Nix/Options & Overrides.md | 23 +++++++++++------------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/pages/Nix/Cachix.md b/pages/Nix/Cachix.md index 73288a5..75a973f 100644 --- a/pages/Nix/Cachix.md +++ b/pages/Nix/Cachix.md @@ -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 diff --git a/pages/Nix/Hyprland on other distros.md b/pages/Nix/Hyprland on other distros.md index fa6c663..6df19a5 100644 --- a/pages/Nix/Hyprland on other distros.md +++ b/pages/Nix/Hyprland on other distros.md @@ -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 diff --git a/pages/Nix/Options & Overrides.md b/pages/Nix/Options & Overrides.md index a05553a..246bc17 100644 --- a/pages/Nix/Options & Overrides.md +++ b/pages/Nix/Options & Overrides.md @@ -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.