Nix: Add page weights, improve formatting (#1182)

* Add page weights for Nix pages

* Reformat warning about required and optional modules

* Cachix: fix callouts

* Hyprland on other Distros: add callout, minor fixes

* _index: reorder links based on new page weights

* Hyprland on NixOS: `callout` and `tab` fixes

* Options and Overrides, Plugins: formatting
This commit is contained in:
Marco Bulgarelli 2025-07-29 22:08:01 +02:00 committed by GitHub
parent eaabf04197
commit b7839925fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 86 additions and 72 deletions

View file

@ -1,9 +1,14 @@
--- ---
title: Cachix title: Cachix
weight: 3
--- ---
NOTE: This page only applies to the flake package. You can safely skip this if {{< callout type=info >}}
you use the Nixpkgs package.
This page only applies to the flake package.
You can safely skip this if you use the Nixpkgs package.
{{< /callout >}}
The Hyprland flake is not built by Hydra, so it is not cached in The Hyprland flake is not built by Hydra, so it is not cached in
[cache.nixos.org], like the rest of Nixpkgs. [cache.nixos.org], like the rest of Nixpkgs.
@ -15,7 +20,7 @@ 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].
{{< callout >}} {{< callout type=warning >}}
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**
using the Hyprland flake package. using the Hyprland flake package.
@ -32,10 +37,9 @@ using the Hyprland flake package.
} }
``` ```
{{< callout type=important >}} Do **not** override Hyprland's `nixpkgs` input {{< callout type=warning >}} Do **not** override Hyprland's `nixpkgs` input
unless you know what you are doing. unless you know what you are doing.
Doing so will render the cache useless, since you're building from a different
Doing so will make the cache useless, since you're building from a different
Nixpkgs commit. {{< /callout >}} Nixpkgs commit. {{< /callout >}}
[cache.nixos.org]: https://cache.nixos.org [cache.nixos.org]: https://cache.nixos.org

View file

@ -1,5 +1,6 @@
--- ---
title: Contributing and Debugging title: Contributing and Debugging
weight: 7
--- ---
Everything needed to build and debug Hyprland and other hyprwm programs is Everything needed to build and debug Hyprland and other hyprwm programs is

View file

@ -1,24 +1,26 @@
--- ---
title: Hyprland on Home Manager title: Hyprland on Home Manager
weight: 2
--- ---
For a list of available options, check the For a list of available options, check the
[Home Manager options](https://nix-community.github.io/home-manager/options.xhtml#opt-wayland.windowManager.hyprland.enable). [Home Manager options](https://nix-community.github.io/home-manager/options.xhtml#opt-wayland.windowManager.hyprland.enable).
{{< callout >}} {{< callout type=warning >}}
- _**(Required)** NixOS Module_: enables critical components needed to run **Required:**
Hyprland properly. - **NixOS Module:** enables critical components needed to run Hyprland properly.
- _Without this, you may have issues with missing session files in your Without this, you may have issues with missing session files in your
Display Manager._ Display Manager.
- _(Optional) Home Manager module_: lets you configure Hyprland declaratively
through Home Manager. **Optional**:
- _This module configures Hyprland and adds it to your user's `$PATH`, but - **Home Manager module:** lets you configure Hyprland declaratively through Home Manager.
- Configures Hyprland and adds it to your user's `$PATH`, but
does not make certain system-level changes such as adding a desktop session does not make certain system-level changes such as adding a desktop session
file for your display manager. This is handled by the NixOS module once you file for your display manager.
enable it._ This is handled by the NixOS module, once you enable it.
{{< /callout >}} {{< /callout >}}
## Installation ## Installation

View file

@ -1,5 +1,6 @@
--- ---
title: Hyprland on NixOS title: Hyprland on NixOS
weight: 1
--- ---
The NixOS module enables critical components needed to run Hyprland properly, The NixOS module enables critical components needed to run Hyprland properly,
@ -11,18 +12,19 @@ your Display Manager.
Make sure to check out the options of the Make sure to check out the options of the
[NixOS module](https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=hyprland). [NixOS module](https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=hyprland).
{{< callout >}} {{< callout type=warning >}}
- _**(Required)** NixOS Module_: enables critical components needed to run **Required:**
Hyprland properly - **NixOS Module:** enables critical components needed to run Hyprland properly.
- _Without this, you may have issues with missing session files in your Without this, you may have issues with missing session files in your
Display Manager._ Display Manager.
- _(Optional) Home Manager module_: lets you configure Hyprland declaratively
through Home Manager. **Optional**:
- _This module configures Hyprland and adds it to your user's `$PATH`, but - **Home Manager module:** lets you configure Hyprland declaratively through Home Manager.
- Configures Hyprland and adds it to your user's `$PATH`, but
does not make certain system-level changes such as adding a desktop session does not make certain system-level changes such as adding a desktop session
file for your display manager. This is handled by the NixOS module once you file for your display manager.
enable it._ This is handled by the NixOS module, once you enable it.
{{< /callout >}} {{< /callout >}}
@ -48,16 +50,15 @@ This will use the Hyprland version included in the Nixpkgs release you're using.
{{< /tab >}} {{< /tab >}}
{{< tab "Flake Package" >}} {{< tab >}}
{{< callout >}} {{< callout type=info >}}
Please enable [Cachix](../Cachix) before using the flake package, so you don't If you don't want to compile Hyprland yourself, make sure to enable [Cachix](../Cachix).
have to compile Hyprland yourself.
{{< /callout >}} {{< /callout >}}
In case you want to use the development version of Hyprland, you can add it like In case you want to use the _development_ version of Hyprland, you can add it like
this: this:
```nix {filename="flake.nix"} ```nix {filename="flake.nix"}
@ -117,10 +118,9 @@ For more details, see
{{< tab "Nix stable" >}} {{< tab "Nix stable" >}}
{{< callout >}} {{< callout type=info >}}
Please enable [Cachix](../Cachix) before using the flake package, so you don't If you don't want to compile Hyprland yourself, make sure to enable [Cachix](../Cachix).
have to compile Hyprland yourself.
{{< /callout >}} {{< /callout >}}
@ -148,7 +148,7 @@ in {
## Fixing problems with themes ## Fixing problems with themes
If your themes for mouse cursors, icons or windows don't load correctly, see the If your themes for your mouse cursors, icons or windows don't load correctly, see the
relevant section in [Hyprland on Home Manager](../Hyprland-on-Home-Manager). relevant section in [Hyprland on Home Manager](../Hyprland-on-Home-Manager).
If you prefer not to use Home Manager, you can also resolve the issues with GTK If you prefer not to use Home Manager, you can also resolve the issues with GTK

View file

@ -1,15 +1,14 @@
--- ---
title: Hyprland on other distros title: Hyprland on Other Distros
weight: 4
--- ---
If you use Nix on distros other than NixOS, you can still use Hyprland. If you use Nix on distros other than NixOS, you can still use Hyprland.
The best option would be through [Home Manager](../Hyprland-on-Home-Manager). The best option would be through [Home Manager](../Hyprland-on-Home-Manager).
However, if Home Manager is not for you, Hyprland can be installed as a normal However, if Home Manager is not for you, Hyprland can be installed as a normal
package. package.
First, [enable flakes](https://nixos.wiki/wiki/Flakes#Enable_flakes), then, once you
First, [enable flakes](https://nixos.wiki/wiki/Flakes#Enable_flakes). Once you
have flakes working, install Hyprland through `nix profile`: have flakes working, install Hyprland through `nix profile`:
{{< tabs items="From Nixpkgs,From the Flake" >}} {{< tabs items="From Nixpkgs,From the Flake" >}}
@ -26,7 +25,11 @@ nix profile install nixpkgs#hyprland
{{< tab "From the Flake" >}} {{< tab "From the Flake" >}}
NOTE: Make sure to enable [Cachix](../Cachix) first. {{< callout type=info >}}
Make sure to enable [Cachix](../Cachix) first.
{{< /callout >}}
```sh ```sh
nix profile install github:hyprwm/Hyprland nix profile install github:hyprwm/Hyprland
@ -37,7 +40,8 @@ nix profile install github:hyprwm/Hyprland
{{< /tabs >}} {{< /tabs >}}
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 drivers.
To get around that, you can use
[nixGL](https://github.com/guibou/nixGL). [nixGL](https://github.com/guibou/nixGL).
First, install it: First, install it:
@ -58,7 +62,7 @@ Or by creating a wrapper script that runs the above command inside.
## Upgrading ## Upgrading
In order to upgrade all your packages, you can run In order to upgrade all your packages, you can run:
```sh ```sh
nix profile upgrade '.*' nix profile upgrade '.*'

View file

@ -1,15 +1,17 @@
--- ---
title: Options & Overrides title: Options & Overrides
weight: 5
--- ---
You can override the package through the `.override` or `.overrideAttrs` You can override the package through the `.override` or `.overrideAttrs`
mechanisms. This is easily achievable on [NixOS](../Hyprland-on-NixOS) or mechanisms.
This is easily achievable on [NixOS](../Hyprland-on-NixOS) or
[Home Manager](../Hyprland-on-Home-Manager). [Home Manager](../Hyprland-on-Home-Manager).
## Package options ## Package options
These are the default options that the Hyprland package is built with. These can These are the default options that the Hyprland package is built with.
be changed by setting the appropriate option to `true`/`false`. These can be changed by setting the appropriate option to `true` or `false`.
### Package ### Package
@ -35,8 +37,8 @@ be changed by setting the appropriate option to `true`/`false`.
### XWayland ### XWayland
XWayland is enabled by default in the Nix package. You can disable it either in XWayland is enabled by default in the Nix package.
the package itself, or through the module options. You can disable it either in the package itself, or through the module options.
## Using Nix repl ## Using Nix repl
@ -49,8 +51,7 @@ nix-repl> :lf github:hyprwm/Hyprland
nix-repl> :bl outputs.packages.x86_64-linux.hyprland.override { /* flag here */ } nix-repl> :bl outputs.packages.x86_64-linux.hyprland.override { /* flag here */ }
``` ```
Then you can run Hyprland from the built path. Then you can run Hyprland from the built path.
You can also use `overrideAttrs` to override `mkDerivation`'s arguments, such as You can also use `overrideAttrs` to override `mkDerivation`'s arguments, such as
`mesonBuildType`: `mesonBuildType`:

View file

@ -1,9 +1,10 @@
--- ---
title: Plugins title: Plugins
weight: 6
--- ---
Hyprland plugins are managed differently on Nix than on other distros. The most Hyprland plugins are managed differently on Nix than on other distros.
notable change is that `hyprpm` is unsupported, but we have our own way of The most notable change is that `hyprpm` is unsupported, but we have our own way of
building plugins. building plugins.
{{< callout type=warning >}} {{< callout type=warning >}}
@ -33,7 +34,7 @@ You can find which plugins are included using
Official plugins made/maintained by vaxry. Official plugins made/maintained by vaxry.
To use these plugins, it is recommended that you are already using the Hyprland To use these plugins, it is recommended to be already using the Hyprland
flake, and **not** the Nixpkgs version. flake, and **not** the Nixpkgs version.
First, add the flake to your flake inputs: First, add the flake to your flake inputs:
@ -54,8 +55,8 @@ First, add the flake to your flake inputs:
``` ```
The `inputs.hyprland.follows` line makes hyprland-plugins use the exact Hyprland The `inputs.hyprland.follows` line makes hyprland-plugins use the exact Hyprland
revision you have locked. This means there aren't any version mismatches, as revision you have locked.
long as you update both inputs at once. This means there aren't any version mismatches, as long as you update both inputs at once.
The next step is adding the plugins to Hyprland: The next step is adding the plugins to Hyprland:
@ -74,8 +75,8 @@ The next step is adding the plugins to Hyprland:
## Building plugins with Nix ## Building plugins with Nix
The plugins inside Nixpkgs, as well as the ones in `hyprland-plugins`, are built The plugins inside Nixpkgs, as well as the ones in `hyprland-plugins`, are built
using a general function, `mkHyprlandPlugin`. Any plugin can be made to work using a general function: `mkHyprlandPlugin`.
with it. The general usage is presented below, exemplified through hy3's Any plugin can be made to work with it. The general usage is presented below, exemplified through hy3's
derivation: derivation:
```nix {filename="plugin.nix"} ```nix {filename="plugin.nix"}

View file

@ -5,18 +5,19 @@ title: Nix
To install Hyprland on NixOS, we provide a NixOS and a Home Manager module. To install Hyprland on NixOS, we provide a NixOS and a Home Manager module.
{{< callout title=Note >}} {{< callout type=warning >}}
- _**(Required)** NixOS Module_: enables critical components needed to run **Required:**
Hyprland properly - **NixOS Module:** enables critical components needed to run Hyprland properly.
- _Without this, you may have issues with missing session files in your Without this, you may have issues with missing session files in your
Display Manager._ Display Manager.
- _(Optional) Home Manager module_: lets you configure Hyprland declaratively
through Home Manager. **Optional**:
- _This module configures Hyprland and adds it to your user's `$PATH`, but - **Home Manager module:** lets you configure Hyprland declaratively through Home Manager.
- Configures Hyprland and adds it to your user's `$PATH`, but
does not make certain system-level changes such as adding a desktop session does not make certain system-level changes such as adding a desktop session
file for your display manager. This is handled by the NixOS module once you file for your display manager.
enable it._ This is handled by the NixOS module, once you enable it.
{{< /callout >}} {{< /callout >}}
@ -30,10 +31,10 @@ To install Hyprland on NixOS, we provide a NixOS and a Home Manager module.
} }
``` ```
For more options, see For other NixOS options, see [Hyprland on NixOS](./Hyprland-on-NixOS).
For additional options, see
[module options](https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=hyprland). [module options](https://search.nixos.org/options?channel=unstable&from=0&size=50&sort=relevance&type=packages&query=hyprland).
For other NixOS options, see [Hyprland on NixOS](./Hyprland-on-NixOS).
## Home Manager module ## Home Manager module