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

View file

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

View file

@ -1,24 +1,26 @@
---
title: Hyprland on Home Manager
weight: 2
---
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).
{{< callout >}}
{{< callout type=warning >}}
- _**(Required)** NixOS Module_: enables critical components needed to run
Hyprland properly.
- _Without this, you may have issues with missing session files in your
Display Manager._
- _(Optional) Home Manager module_: lets you configure Hyprland declaratively
through Home Manager.
- _This module configures Hyprland and adds it to your user's `$PATH`, but
**Required:**
- **NixOS Module:** enables critical components needed to run Hyprland properly.
Without this, you may have issues with missing session files in your
Display Manager.
**Optional**:
- **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
file for your display manager. This is handled by the NixOS module once you
enable it._
file for your display manager.
This is handled by the NixOS module, once you enable it.
{{< /callout >}}
{{< /callout >}}
## Installation

View file

@ -1,5 +1,6 @@
---
title: Hyprland on NixOS
weight: 1
---
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
[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
Hyprland properly
- _Without this, you may have issues with missing session files in your
Display Manager._
- _(Optional) Home Manager module_: lets you configure Hyprland declaratively
through Home Manager.
- _This module configures Hyprland and adds it to your user's `$PATH`, but
**Required:**
- **NixOS Module:** enables critical components needed to run Hyprland properly.
Without this, you may have issues with missing session files in your
Display Manager.
**Optional**:
- **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
file for your display manager. This is handled by the NixOS module once you
enable it._
file for your display manager.
This is handled by the NixOS module, once you enable it.
{{< /callout >}}
@ -48,16 +50,15 @@ This will use the Hyprland version included in the Nixpkgs release you're using.
{{< /tab >}}
{{< tab "Flake Package" >}}
{{< tab >}}
{{< callout >}}
{{< callout type=info >}}
Please enable [Cachix](../Cachix) before using the flake package, so you don't
have to compile Hyprland yourself.
If you don't want to compile Hyprland yourself, make sure to enable [Cachix](../Cachix).
{{< /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:
```nix {filename="flake.nix"}
@ -117,10 +118,9 @@ For more details, see
{{< tab "Nix stable" >}}
{{< callout >}}
{{< callout type=info >}}
Please enable [Cachix](../Cachix) before using the flake package, so you don't
have to compile Hyprland yourself.
If you don't want to compile Hyprland yourself, make sure to enable [Cachix](../Cachix).
{{< /callout >}}
@ -148,7 +148,7 @@ in {
## 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).
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).
However, if Home Manager is not for you, Hyprland can be installed as a normal
package.
First, [enable flakes](https://nixos.wiki/wiki/Flakes#Enable_flakes). Once you
package.
First, [enable flakes](https://nixos.wiki/wiki/Flakes#Enable_flakes), then, once you
have flakes working, install Hyprland through `nix profile`:
{{< tabs items="From Nixpkgs,From the Flake" >}}
@ -26,7 +25,11 @@ nix profile install nixpkgs#hyprland
{{< tab "From the Flake" >}}
NOTE: Make sure to enable [Cachix](../Cachix) first.
{{< callout type=info >}}
Make sure to enable [Cachix](../Cachix) first.
{{< /callout >}}
```sh
nix profile install github:hyprwm/Hyprland
@ -37,7 +40,8 @@ nix profile install github:hyprwm/Hyprland
{{< /tabs >}}
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).
First, install it:
@ -58,7 +62,7 @@ Or by creating a wrapper script that runs the above command inside.
## Upgrading
In order to upgrade all your packages, you can run
In order to upgrade all your packages, you can run:
```sh
nix profile upgrade '.*'

View file

@ -1,15 +1,17 @@
---
title: Options & Overrides
weight: 5
---
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).
## Package options
These are the default options that the Hyprland package is built with. These can
be changed by setting the appropriate option to `true`/`false`.
These are the default options that the Hyprland package is built with.
These can be changed by setting the appropriate option to `true` or `false`.
### Package
@ -35,8 +37,8 @@ be changed by setting the appropriate option to `true`/`false`.
### XWayland
XWayland is enabled by default in the Nix package. You can disable it either in
the package itself, or through the module options.
XWayland is enabled by default in the Nix package.
You can disable it either in the package itself, or through the module options.
## 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 */ }
```
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
`mesonBuildType`:

View file

@ -1,9 +1,10 @@
---
title: Plugins
weight: 6
---
Hyprland plugins are managed differently on Nix than on other distros. The most
notable change is that `hyprpm` is unsupported, but we have our own way of
Hyprland plugins are managed differently on Nix than on other distros.
The most notable change is that `hyprpm` is unsupported, but we have our own way of
building plugins.
{{< callout type=warning >}}
@ -33,7 +34,7 @@ You can find which plugins are included using
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.
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
revision you have locked. This means there aren't any version mismatches, as
long as you update both inputs at once.
revision you have locked.
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:
@ -74,8 +75,8 @@ The next step is adding the plugins to Hyprland:
## Building plugins with Nix
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
with it. The general usage is presented below, exemplified through hy3's
using a general function: `mkHyprlandPlugin`.
Any plugin can be made to work with it. The general usage is presented below, exemplified through hy3's
derivation:
```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.
{{< callout title=Note >}}
{{< callout type=warning >}}
- _**(Required)** NixOS Module_: enables critical components needed to run
Hyprland properly
- _Without this, you may have issues with missing session files in your
Display Manager._
- _(Optional) Home Manager module_: lets you configure Hyprland declaratively
through Home Manager.
- _This module configures Hyprland and adds it to your user's `$PATH`, but
**Required:**
- **NixOS Module:** enables critical components needed to run Hyprland properly.
Without this, you may have issues with missing session files in your
Display Manager.
**Optional**:
- **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
file for your display manager. This is handled by the NixOS module once you
enable it._
file for your display manager.
This is handled by the NixOS module, once you enable it.
{{< /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).
For other NixOS options, see [Hyprland on NixOS](./Hyprland-on-NixOS).
## Home Manager module