Nix: reword pages

This commit is contained in:
Mihai Fufezan 2023-02-14 15:30:40 +02:00
parent 3ea348c377
commit 2b7ad5454f
No known key found for this signature in database
GPG key ID: 5899325F2F120900
7 changed files with 61 additions and 31 deletions

View file

@ -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 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 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. variables to improve Wayland compatibility, or simply change certain aspects of your desktop.

View file

@ -1,7 +1,9 @@
Hyprland often needs dependencies which aren't yet cached in `cache.nixos.org`. Hyprland is not build by Hydra and cached in `cache.nixos.org`, like the rest
Instead of requiring you to build those dependencies (which may include `mesa`, of the Nixpkgs packages.
`ffmpeg`, etc), we provide a Cachix cache that you can add to your Nix
substituters. 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 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`.

View file

@ -7,6 +7,7 @@ For a list of available options, check the
```nix ```nix
# flake.nix # flake.nix
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
@ -39,7 +40,8 @@ Don't forget to replace `user@hostname` with your username and hostname!
```nix ```nix
# home config # home config
{config, pkgs, ...}: let
{pkgs, ...}: let
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
hyprland = (import flake-compat { hyprland = (import flake-compat {
@ -50,7 +52,13 @@ in {
hyprland.homeManagerModules.default hyprland.homeManagerModules.default
]; ];
wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland = {
enable = true;
extraConfig = ''
bind = SUPER, Return, exec, kitty
# ... # ...
'';
};
} }
``` ```

View file

@ -5,9 +5,9 @@ graphics drivers, fonts, dconf, xwayland, and adding a proper Desktop Entry to
your Display Manager. your Display Manager.
Make sure to check out the options of the 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. As such, installation using the Flake is recommended.
## With flakes ## With flakes
@ -45,19 +45,28 @@ and `nvidiaPatches` options no longer apply.
```nix ```nix
# configuration.nix # configuration.nix
{config, pkgs, ...}: let
{pkgs, ...}: let
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
hyprland = (import flake-compat { hyprland = (import flake-compat {
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz";
}).defaultNix; }).defaultNix;
in { in {
imports = [ imports = [hyprland.nixosModules.default];
hyprland.nixosModules.default
];
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
# default options, you don't need to set them
package = hyprland.packages.${pkgs.system}.default; package = hyprland.packages.${pkgs.system}.default;
xwayland = {
enable = true;
hidpi = true;
};
nvidiaPatches = false;
}; };
} }
``` ```

View file

@ -9,7 +9,7 @@ can be changed by setting the appropriate option to `true`/`false`.
### Package ### Package
```nix ```nix
(inputs.hyprland.packages.${pkgs.default}.default.override { (inputs.hyprland.packages.${pkgs.hostPlatform.system}.default.override {
enableXWayland = true; enableXWayland = true;
hidpiXWayland = true; hidpiXWayland = true;
nvidiaPatches = false; nvidiaPatches = false;
@ -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 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, 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 or by passing the `hidpiXWayland = false;` flag, the same way as
[disabling XWayland](#package) [disabling XWayland](#package).
### Nvidia Patches ### Nvidia Patches

View file

@ -2,7 +2,7 @@
(xdpw), which supports window sharing and region sharing (currently broken), (xdpw), which supports window sharing and region sharing (currently broken),
apart from output (per-screen) sharing. 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 getting the window list. However, we cannot make a cross-dependency betwen
the Hyprland flake and the `xdph` flake. 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 {{< hint >}}
have to tinker with it if you use the module. 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 If you don't use the module, you will want to do a similar override in your
configuration. configuration.

View file

@ -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 >}} {{< hint type=warning >}}
@ -8,18 +13,22 @@ work as intended. Please use the
{{< /hint >}} {{< /hint >}}
First of all, it is a good idea to set up [Cachix](./Cachix) before continuing If you're on NixOS and also use HM, it is a good idea to use Hyprland modules
with installing Hyprland.
Start off by choosing your appropriate install method on the sidebar.
## Modules mix'n'match
- 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. for both. Make sure the package options are the same for both modules.
- If you don't plan on using the NixOS module, but want to use the HM module, you Read [Hyprland on NixOS](./Hyprland-on-NixOS) and
[Hyprland on Home Manager](./Hyprland-on-Home-Manager).
## Home Manager only
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. will have to enable all the options the NixOS module enables.
- If you don't plan on using any module, manually enable whatever options the Read [Hyprland on Home Manager](./Hyprland-on-Home-Manager).
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).