mirror of
https://github.com/hyprwm/hyprland-wiki.git
synced 2024-11-22 12:45:59 +01:00
Nix: reword pages
This commit is contained in:
parent
3ea348c377
commit
2b7ad5454f
7 changed files with 61 additions and 31 deletions
|
@ -1,4 +1,4 @@
|
|||
As [aforementioned](../Getting-Started/Master-Tutorial/#launching-hyprland-part-1), it's
|
||||
As [aforementioned](../../Getting-Started/Master-Tutorial/#launching-hyprland-part-1), it's
|
||||
useful using a wrapper to launch Hyprland. Whether you start Hyprland through TTY or a Display
|
||||
Manager, it is always suggested to use one. As such, you can pass certain environment
|
||||
variables to improve Wayland compatibility, or simply change certain aspects of your desktop.
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
Hyprland often needs dependencies which aren't yet cached in `cache.nixos.org`.
|
||||
Instead of requiring you to build those dependencies (which may include `mesa`,
|
||||
`ffmpeg`, etc), we provide a Cachix cache that you can add to your Nix
|
||||
substituters.
|
||||
Hyprland is not build by Hydra and cached in `cache.nixos.org`, like the rest
|
||||
of the Nixpkgs packages.
|
||||
|
||||
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`.
|
||||
|
|
|
@ -7,6 +7,7 @@ For a list of available options, check the
|
|||
|
||||
```nix
|
||||
# flake.nix
|
||||
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
@ -39,7 +40,8 @@ Don't forget to replace `user@hostname` with your username and hostname!
|
|||
|
||||
```nix
|
||||
# home config
|
||||
{config, pkgs, ...}: let
|
||||
|
||||
{pkgs, ...}: let
|
||||
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
|
||||
|
||||
hyprland = (import flake-compat {
|
||||
|
@ -50,7 +52,13 @@ in {
|
|||
hyprland.homeManagerModules.default
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
# ...
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = ''
|
||||
bind = SUPER, Return, exec, kitty
|
||||
# ...
|
||||
'';
|
||||
};
|
||||
}
|
||||
```
|
||||
|
|
|
@ -5,9 +5,9 @@ graphics drivers, fonts, dconf, xwayland, and adding a proper Desktop Entry to
|
|||
your Display Manager.
|
||||
|
||||
Make sure to check out the options of the
|
||||
[Nix module](https://github.com/hyprwm/Hyprland/blob/main/nix/module.nix).
|
||||
[NixOS module](https://github.com/hyprwm/Hyprland/blob/main/nix/module.nix).
|
||||
|
||||
Do note that the Nixpkgs Hyprland package is not actively maintained, and may be outdated.
|
||||
Note that the Nixpkgs Hyprland package is not actively maintained, and may be outdated.
|
||||
As such, installation using the Flake is recommended.
|
||||
|
||||
## With flakes
|
||||
|
@ -45,19 +45,28 @@ and `nvidiaPatches` options no longer apply.
|
|||
|
||||
```nix
|
||||
# configuration.nix
|
||||
{config, pkgs, ...}: let
|
||||
|
||||
{pkgs, ...}: let
|
||||
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
|
||||
|
||||
hyprland = (import flake-compat {
|
||||
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz";
|
||||
}).defaultNix;
|
||||
in {
|
||||
imports = [
|
||||
hyprland.nixosModules.default
|
||||
];
|
||||
imports = [hyprland.nixosModules.default];
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
|
||||
# default options, you don't need to set them
|
||||
package = hyprland.packages.${pkgs.system}.default;
|
||||
|
||||
xwayland = {
|
||||
enable = true;
|
||||
hidpi = true;
|
||||
};
|
||||
|
||||
nvidiaPatches = false;
|
||||
};
|
||||
}
|
||||
```
|
||||
|
|
|
@ -9,7 +9,7 @@ can be changed by setting the appropriate option to `true`/`false`.
|
|||
### Package
|
||||
|
||||
```nix
|
||||
(inputs.hyprland.packages.${pkgs.default}.default.override {
|
||||
(inputs.hyprland.packages.${pkgs.hostPlatform.system}.default.override {
|
||||
enableXWayland = true;
|
||||
hidpiXWayland = true;
|
||||
nvidiaPatches = false;
|
||||
|
@ -44,7 +44,7 @@ XWayland windows.
|
|||
In order to enable the functionality, you have to add:
|
||||
|
||||
```toml
|
||||
exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
|
||||
exec-once = xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
|
||||
```
|
||||
|
||||
This will make XWayland programs look as if they were unscaled. To fix this, you
|
||||
|
@ -66,7 +66,7 @@ people who don't have HiDPI screens.
|
|||
If you _do_ insist on disabling it though (e.g. for adding your own patches
|
||||
to wlroots), you can do so by either using the `hyprland-no-hidpi` package,
|
||||
or by passing the `hidpiXWayland = false;` flag, the same way as
|
||||
[disabling XWayland](#package)
|
||||
[disabling XWayland](#package).
|
||||
|
||||
### Nvidia Patches
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
(xdpw), which supports window sharing and region sharing (currently broken),
|
||||
apart from output (per-screen) sharing.
|
||||
|
||||
Due to the internal workings, `xdph` depends on the Hyrpland package for
|
||||
Due to the internal workings, `xdph` depends on the Hyprland package for
|
||||
getting the window list. However, we cannot make a cross-dependency betwen
|
||||
the Hyprland flake and the `xdph` flake.
|
||||
|
||||
|
@ -16,8 +16,10 @@ xdg-desktop-portal-hyprland = inputs.xdph.packages.${prev.system}.default.overri
|
|||
};
|
||||
```
|
||||
|
||||
A similar override is being done inside the NixOS module, which means you don't
|
||||
have to tinker with it if you use the module.
|
||||
{{< hint >}}
|
||||
A similar override is done inside the [NixOS module](../Hyprland-on-NixOS), so
|
||||
you do not have to tinker with it if you use the module.
|
||||
{{< /hint >}}
|
||||
|
||||
If you don't use the module, you will want to do a similar override in your
|
||||
configuration.
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
## Hyprland on Nix
|
||||
First of all, it is a good idea to set up [Cachix](./Cachix) before continuing
|
||||
with installing Hyprland.
|
||||
|
||||
After getting Cachix working, you have a few options ahead:
|
||||
|
||||
## NixOS + Home Manager (recommended)
|
||||
|
||||
{{< hint type=warning >}}
|
||||
|
||||
|
@ -8,18 +13,22 @@ work as intended. Please use the
|
|||
|
||||
{{< /hint >}}
|
||||
|
||||
First of all, it is a good idea to set up [Cachix](./Cachix) before continuing
|
||||
with installing Hyprland.
|
||||
If you're on NixOS and also use HM, it is a good idea to use Hyprland modules
|
||||
for both. Make sure the package options are the same for both modules.
|
||||
|
||||
Start off by choosing your appropriate install method on the sidebar.
|
||||
Read [Hyprland on NixOS](./Hyprland-on-NixOS) and
|
||||
[Hyprland on Home Manager](./Hyprland-on-Home-Manager).
|
||||
|
||||
## Modules mix'n'match
|
||||
## Home Manager only
|
||||
|
||||
- If you're on NixOS and also use HM it's a good idea to use Hyprland modules
|
||||
for both. Make sure the package options are the same for both modules.
|
||||
If you do not plan on using the NixOS module, but want to use the HM module, you
|
||||
will have to enable all the options the NixOS module enables.
|
||||
|
||||
- If you don't plan on using the NixOS module, but want to use the HM module, you
|
||||
will have to enable all the options the NixOS module enables.
|
||||
Read [Hyprland on Home Manager](./Hyprland-on-Home-Manager).
|
||||
|
||||
- If you don't plan on using any module, manually enable whatever options the
|
||||
modules set.
|
||||
## On your own
|
||||
|
||||
If you don't plan on using any module, manually enable all the options that the
|
||||
modules have set.
|
||||
|
||||
Read [the sources](https://github.com/hyprwm/Hyprland/tree/main/nix).
|
||||
|
|
Loading…
Reference in a new issue