Nix: update flake url

This commit is contained in:
Mihai Fufezan 2024-05-05 15:56:59 +03:00
parent aaf3be8ab5
commit 0f744aceb9
No known key found for this signature in database
4 changed files with 27 additions and 21 deletions

View File

@ -14,7 +14,7 @@ For a list of available options, check the
## Installation
{{< tabs items="Home Manager,Flakes,No Flakes (with flake-compat)" >}}
{{< tabs items="Home Manager,Flakes,Nix stable (with flake-compat)" >}}
{{< tab "Home Manager" >}}
@ -57,7 +57,7 @@ Don't forget to replace `user@hostname` with your username and hostname!
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland";
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
};
outputs = {nixpkgs, home-manager, hyprland, ...}: {
@ -87,8 +87,8 @@ you should use the downstream Home Manager module.
{{< /callout >}}
The following snippet of code tries to show how to bring the Hyprland flake from
the flake input and import it into the module system. Feel free to make any
adjustment for your setup.
the flake input and use the package in the Home Manager option. Feel free to
make any adjustment for your setup.
```nix
# home config
@ -96,13 +96,19 @@ adjustment for your setup.
{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";
hyprland-flake = (import flake-compat {
# we're not using pkgs.fetchgit as that requires a hash to be provided
src = builtins.fetchGit {
url = "https://github.com/hyprwm/Hyprland.git";
submodules = true;
};
}).defaultNix;
in {
imports = [hyprland.homeManagerModules.default];
wayland.windowManager.hyprland = {
enable = true;
wayland.windowManager.hyprland.enable = true;
package = hyprland-flake.packages.${pkgs.system}.hyprland;
}
}
```

View File

@ -19,7 +19,7 @@ Make sure to check out the options of the
{{< /callout >}}
{{< tabs items="Nixpkgs,Flake Package, No Flakes (with flake-compat)" >}}
{{< tabs items="Nixpkgs,Flakes,Nix stable (flake-compat)" >}}
{{< tab "Nixpkgs" >}}
@ -35,7 +35,7 @@ This will use the Hyprland version that Nixpkgs has.
{{< /tab >}}
{{< tab "Flake package" >}}
{{< tab "Flake Package" >}}
{{< callout >}}
@ -51,7 +51,7 @@ this:
# flake.nix
{
inputs.hyprland.url = "github:hyprwm/Hyprland";
inputs.hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
# ...
outputs = {nixpkgs, ...} @ inputs: {
@ -76,8 +76,6 @@ this:
Don't forget to change the `HOSTNAME` to your actual hostname!
{{< callout >}}
If you start experiencing lag and FPS drops in games or programs like Blender on
**stable** NixOS when using the Hyprland flake, it most likely is a `mesa`
version mismatch between your system and Hyprland.
@ -101,11 +99,9 @@ in {
For more details, see
[issue #5148](https://github.com/hyprwm/Hyprland/issues/5148).
{{< /callout >}}
{{< /tab >}}
{{< tab "Flake package, Nix stable" >}}
{{< tab "Nix stable" >}}
{{< callout >}}
@ -120,13 +116,17 @@ have to compile Hyprland yourself.
{pkgs, ...}: let
flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";
hyprland-flake = (import flake-compat {
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz";
hyprland = (import flake-compat {
# we're not using pkgs.fetchgit as that requires a hash to be provided
src = builtins.fetchGit {
url = "https://github.com/hyprwm/Hyprland.git";
submodules = true;
};
}).defaultNix;
in {
programs.hyprland = {
enable = true;
package = hyprland-flake.packages.${pkgs.system}.hyprland;
package = hyprland.packages.${pkgs.system}.hyprland;
};
}
```

View File

@ -28,7 +28,7 @@ nix profile install nixpkgs#hyprland
NOTE: Make sure to enable [Cachix](../Cachix) first.
```sh
nix profile install github:hyprwm/Hyprland
nix profile install git+https://github.com/hyprwm/Hyprland?submodules=1
```
{{< /tab >}}

View File

@ -48,7 +48,7 @@ you can do it like this:
```nix
$ nix repl
nix-repl> :lf "github:hyprwm/Hyprland"
nix-repl> :lf git+https://github.com/hyprwm/Hyprland?submodules=1
nix-repl> :bl outputs.packages.x86_64-linux.hyprland.override { /* flag here */ }
```