Skip to content

Commit

Permalink
Update readme and flake to match upstream home manager plugins list
Browse files Browse the repository at this point in the history
  • Loading branch information
outfoxxed committed May 3, 2023
1 parent 87e82cc commit 7d70e7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 24 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You can use `hy3:makegroup` to create a new split.

### Nix
#### Using the home-manager module
Assuming you use hyprland's home manager module, you can easily integrate hy3, as hy3 provides a home manager module that exposes the `wayland.windowManager.hyprland.plugins.hy3.enable` option.
Assuming you use hyprland's home manager module, you can easily integrate hy3 by adding it to the plugins array.

```nix
# flake.nix
Expand Down Expand Up @@ -70,12 +70,11 @@ Assuming you use hyprland's home manager module, you can easily integrate hy3, a
modules = [
hyprland.homeManagerModules.default
hy3.homeManagerModules.default
{
wayland.windowManager.hyprland = {
enable = true;
plugins.hy3.enable = true;
plugins = [ hy3.packages.x86_64-linux.hy3 ];
};
}
];
Expand All @@ -93,7 +92,7 @@ directly use it in your hyprland config like so:
wayland.windowManager.hyprland = {
# ...
extraConfig = ''
exec-once = hyprctl plugin load ${hy3.packages.x86_64-linux.hy3}/lib/libhy3.so
plugin = ${hy3.packages.x86_64-linux.hy3}/lib/libhy3.so
'';
};
```
Expand Down
20 changes: 0 additions & 20 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,5 @@
inputsFrom = [ self.packages.${system}.hy3 ];
};
});

homeManagerModules.default = { config, lib, pkgs, ... }: let
cfg = config.wayland.windowManager.hyprland.plugins.hy3;
hy3Package = self.packages.${pkgs.hostPlatform.system}.default;
in {
options.wayland.windowManager.hyprland.plugins.hy3 = {
enable = lib.mkEnableOption "hy3 plugin";

package = lib.mkOption {
type = lib.types.package;
default = hy3Package;
};
};

config = lib.mkIf cfg.enable {
wayland.windowManager.hyprland.extraConfig = ''
plugin = ${cfg.package}/lib/libhy3.so
'';
};
};
};
}

0 comments on commit 7d70e7d

Please sign in to comment.