From 7d70e7d890983bd6da402b69428ff6eb8d865083 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Wed, 3 May 2023 12:05:14 -0700 Subject: [PATCH] Update readme and flake to match upstream home manager plugins list --- README.md | 7 +++---- flake.nix | 20 -------------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 4eaa3c4..fd7e461 100644 --- a/README.md +++ b/README.md @@ -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 ''; }; ``` diff --git a/flake.nix b/flake.nix index 63ddbfe..75e1b45 100644 --- a/flake.nix +++ b/flake.nix @@ -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 - ''; - }; - }; }; }