refactor(gyroflow): move package to module

This commit is contained in:
514fpv 2024-03-18 09:38:16 +08:00
parent 1ec95fe714
commit 6707ee74fd
Signed by: koishi
SSH key fingerprint: SHA256:axz0uIzzY+5W19i7QOUuiw5LSqhKfCBKPf3L4xFRxLw
2 changed files with 8 additions and 3 deletions

View file

@ -4,9 +4,7 @@
, ... }: with lib; let , ... }: with lib; let
cfg = config.passthrough.gyroflow; cfg = config.passthrough.gyroflow;
in mkIf cfg.enable { in mkIf cfg.enable {
home.packages = with pkgs; [ (gyroflow.overrideAttrs (finalAttrs: previousAttrs: { home.packages = [ cfg.package ];
buildInputs = previousAttrs.buildInputs ++ [ pkgs.qt6Packages.qtwayland ];
})) ];
wayland.windowManager.sway.config.window.commands = [ wayland.windowManager.sway.config.window.commands = [
{ criteria.app_id = "xyz.gyroflow.gyroflow"; command = "floating enable"; } { criteria.app_id = "xyz.gyroflow.gyroflow"; command = "floating enable"; }

View file

@ -6,6 +6,13 @@
in { in {
options.home.gyroflow = { options.home.gyroflow = {
enable = mkEnableOption "gyroflow stabilisation software"; enable = mkEnableOption "gyroflow stabilisation software";
package = mkOption {
type = with types; package;
default = pkgs.gyroflow.overrideAttrs (finalAttrs: previousAttrs: {
buildInputs = previousAttrs.buildInputs ++ [ pkgs.qt6Packages.qtwayland ];
});
description = "gyroflow package";
};
}; };
config = { config = {