Update readme and flake to match upstream home manager plugins list

This commit is contained in:
outfoxxed 2023-05-03 12:05:14 -07:00
parent 87e82cc574
commit 7d70e7d890
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
2 changed files with 3 additions and 24 deletions

View file

@ -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
@ -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 ];
};
}
];
@ -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
'';
};
```

View file

@ -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
'';
};
};
};
}