Nix: update flake url

This commit is contained in:
Mihai Fufezan 2024-05-05 15:56:59 +03:00
parent aaf3be8ab5
commit 0f744aceb9
Signed by: fufexan
SSH key fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg
4 changed files with 27 additions and 21 deletions

View file

@ -14,7 +14,7 @@ For a list of available options, check the
## Installation ## Installation
{{< tabs items="Home Manager,Flakes,No Flakes (with flake-compat)" >}} {{< tabs items="Home Manager,Flakes,Nix stable (with flake-compat)" >}}
{{< tab "Home Manager" >}} {{< tab "Home Manager" >}}
@ -57,7 +57,7 @@ Don't forget to replace `user@hostname` with your username and hostname!
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprland.url = "github:hyprwm/Hyprland"; hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
}; };
outputs = {nixpkgs, home-manager, hyprland, ...}: { outputs = {nixpkgs, home-manager, hyprland, ...}: {
@ -87,8 +87,8 @@ you should use the downstream Home Manager module.
{{< /callout >}} {{< /callout >}}
The following snippet of code tries to show how to bring the Hyprland flake from 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 the flake input and use the package in the Home Manager option. Feel free to
adjustment for your setup. make any adjustment for your setup.
```nix ```nix
# home config # home config
@ -96,13 +96,19 @@ adjustment for your setup.
{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-flake = (import flake-compat {
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; # 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; }).defaultNix;
in { 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 >}} {{< /callout >}}
{{< tabs items="Nixpkgs,Flake Package, No Flakes (with flake-compat)" >}} {{< tabs items="Nixpkgs,Flakes,Nix stable (flake-compat)" >}}
{{< tab "Nixpkgs" >}} {{< tab "Nixpkgs" >}}
@ -35,7 +35,7 @@ This will use the Hyprland version that Nixpkgs has.
{{< /tab >}} {{< /tab >}}
{{< tab "Flake package" >}} {{< tab "Flake Package" >}}
{{< callout >}} {{< callout >}}
@ -51,7 +51,7 @@ this:
# flake.nix # flake.nix
{ {
inputs.hyprland.url = "github:hyprwm/Hyprland"; inputs.hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
# ... # ...
outputs = {nixpkgs, ...} @ inputs: { outputs = {nixpkgs, ...} @ inputs: {
@ -76,8 +76,6 @@ this:
Don't forget to change the `HOSTNAME` to your actual hostname! 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 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` **stable** NixOS when using the Hyprland flake, it most likely is a `mesa`
version mismatch between your system and Hyprland. version mismatch between your system and Hyprland.
@ -101,11 +99,9 @@ in {
For more details, see For more details, see
[issue #5148](https://github.com/hyprwm/Hyprland/issues/5148). [issue #5148](https://github.com/hyprwm/Hyprland/issues/5148).
{{< /callout >}}
{{< /tab >}} {{< /tab >}}
{{< tab "Flake package, Nix stable" >}} {{< tab "Nix stable" >}}
{{< callout >}} {{< callout >}}
@ -120,13 +116,17 @@ have to compile Hyprland yourself.
{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-flake = (import flake-compat { hyprland = (import flake-compat {
src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; # 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; }).defaultNix;
in { in {
programs.hyprland = { programs.hyprland = {
enable = true; 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. NOTE: Make sure to enable [Cachix](../Cachix) first.
```sh ```sh
nix profile install github:hyprwm/Hyprland nix profile install git+https://github.com/hyprwm/Hyprland?submodules=1
``` ```
{{< /tab >}} {{< /tab >}}

View file

@ -48,7 +48,7 @@ you can do it like this:
```nix ```nix
$ nix repl $ 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 */ } nix-repl> :bl outputs.packages.x86_64-linux.hyprland.override { /* flag here */ }
``` ```