2024-02-20 21:16:07 +01:00
|
|
|
---
|
|
|
|
title: Hyprland on other distros
|
|
|
|
---
|
|
|
|
|
2022-12-18 14:20:19 +01:00
|
|
|
If you use Nix on distros other than NixOS, you can still use Hyprland.
|
|
|
|
|
2024-03-17 13:44:39 +01:00
|
|
|
The best option would be through [Home Manager](../Hyprland-on-Home-Manager).
|
2022-12-18 14:20:19 +01:00
|
|
|
|
|
|
|
However, if Home Manager is not for you, you can use it as a normal package.
|
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
First, [enable flakes](https://nixos.wiki/wiki/Flakes#Enable_flakes). Once you
|
|
|
|
have flakes working, install Hyprland through `nix profile`:
|
2023-07-17 18:14:43 +02:00
|
|
|
|
2024-02-20 21:16:07 +01:00
|
|
|
{{< tabs items="From Nixpkgs,From the Flake" >}}
|
2023-07-17 18:14:43 +02:00
|
|
|
|
|
|
|
{{< tab "From Nixpkgs" >}}
|
2023-04-09 14:02:54 +02:00
|
|
|
|
|
|
|
The easiest method is to get Hyprland directly from Nixpkgs:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
nix profile install nixpkgs#hyprland
|
|
|
|
```
|
|
|
|
|
2023-07-17 18:14:43 +02:00
|
|
|
{{< /tab >}}
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-07-17 18:14:43 +02:00
|
|
|
{{< tab "From the Flake" >}}
|
2022-12-18 14:20:19 +01:00
|
|
|
|
2024-03-17 13:44:39 +01:00
|
|
|
NOTE: Make sure to enable [Cachix](../Cachix) first.
|
2022-12-18 14:20:19 +01:00
|
|
|
|
|
|
|
```sh
|
2024-05-05 14:56:59 +02:00
|
|
|
nix profile install git+https://github.com/hyprwm/Hyprland?submodules=1
|
2022-12-18 14:20:19 +01:00
|
|
|
```
|
|
|
|
|
2023-07-17 18:14:43 +02:00
|
|
|
{{< /tab >}}
|
2024-02-20 21:16:07 +01:00
|
|
|
|
2023-07-17 18:14:43 +02:00
|
|
|
{{< /tabs >}}
|
|
|
|
|
2022-12-18 14:20:19 +01:00
|
|
|
Since you're using Hyprland outside of NixOS, it won't be able to find graphics
|
2024-02-20 21:16:07 +01:00
|
|
|
drivers. To get around that, you can use
|
|
|
|
[nixGL](https://github.com/guibou/nixGL).
|
2022-12-18 14:20:19 +01:00
|
|
|
|
2023-08-26 18:31:56 +02:00
|
|
|
First, install it:
|
2022-12-18 14:20:19 +01:00
|
|
|
|
|
|
|
```sh
|
|
|
|
nix profile install github:guibou/nixGL --impure
|
|
|
|
```
|
|
|
|
|
2023-08-26 18:31:56 +02:00
|
|
|
`--impure` is needed due to `nixGL`'s reliance on hardware information.
|
2022-12-18 14:20:19 +01:00
|
|
|
|
2024-04-21 16:35:48 +02:00
|
|
|
From now on, you can run Hyprland by invoking it with nixGL.
|
2022-12-18 14:20:19 +01:00
|
|
|
|
|
|
|
```sh
|
|
|
|
nixGL Hyprland
|
|
|
|
```
|
|
|
|
|
2024-04-21 16:35:48 +02:00
|
|
|
Or by creating a wrapper script that runs the above command inside.
|
2022-12-18 14:20:19 +01:00
|
|
|
|
|
|
|
## Upgrading
|
|
|
|
|
|
|
|
In order to upgrade all your packages, you can run
|
|
|
|
|
|
|
|
```sh
|
|
|
|
nix profile upgrade '.*'
|
|
|
|
```
|
|
|
|
|
|
|
|
Check the
|
|
|
|
[nix profile](https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-profile.html)
|
|
|
|
command documentation for other upgrade options.
|