VortexCoyote / hyprfocus

a focus animation plugin for Hyprland inspired by Flashfocus
BSD 3-Clause "New" or "Revised" License
168 stars 15 forks source link

Add flake.nix #10

Closed OakleyCord closed 1 year ago

OakleyCord commented 1 year ago

This allows people on NixOS to easily use this plugin :)

Heavily referenced from this project.

VortexCoyote commented 1 year ago

I can't verify that this works, due to me not knowing enough about nix flakes. but since it doesn't break anything with the plugin itself, I will merge!

OakleyCord commented 1 year ago

it does work, the only thing is that the install part of this flake may be unconventional but it works

nyawox commented 1 year ago

Thanks I was also planning to make same PR around that time:) Just revisited now and confirmed it can be installed. It crashes though what version of Hyprland are you using? I tried both from nixos-unstable and latest from upstream flake.

OakleyCord commented 1 year ago

Thanks I was also planning to make same PR around that time:) Just revisited now and confirmed it can be installed. It crashes though what version of Hyprland are you using? I tried both from nixos-unstable and latest from upstream flake.

hi could you elaborate more? (error logs, nix config)

here's how i have it setup: flake.nix:

  inputs = {
    ...
    # referencing latest version instead of latest git incase of breaking changes 
    hyprland.url = "github:hyprwm/Hyprland?ref=v0.32.0";
    hyprfocus = {
      url = "github:VortexCoyote/hyprfocus";
      # important!
      inputs.hyprland.follows = "hyprland";
    };
  };
  ...

home.nix:

...
  wayland.windowManager.hyprland = {
    enable = true;
    # important!
    package = inputs.hyprland.packages.${pkgs.system}.hyprland;

    plugins = [
      inputs.hyprfocus.packages.${pkgs.system}.default
     ];
  };
...

hope this helps :3

nyawox commented 1 year ago

I just had to override home-manager hyprland package to the one from hyprland flake thank you