From 6707ee74fd22bcee6cc166aea2286aea9cdc7a1e Mon Sep 17 00:00:00 2001 From: 514fpv Date: Mon, 18 Mar 2024 09:38:16 +0800 Subject: [PATCH] refactor(gyroflow): move package to module --- home/gyroflow/home.nix | 4 +--- home/gyroflow/nixos.nix | 7 +++++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/home/gyroflow/home.nix b/home/gyroflow/home.nix index 9146afda..5ec39359 100644 --- a/home/gyroflow/home.nix +++ b/home/gyroflow/home.nix @@ -4,9 +4,7 @@ , ... }: with lib; let cfg = config.passthrough.gyroflow; in mkIf cfg.enable { - home.packages = with pkgs; [ (gyroflow.overrideAttrs (finalAttrs: previousAttrs: { - buildInputs = previousAttrs.buildInputs ++ [ pkgs.qt6Packages.qtwayland ]; - })) ]; + home.packages = [ cfg.package ]; wayland.windowManager.sway.config.window.commands = [ { criteria.app_id = "xyz.gyroflow.gyroflow"; command = "floating enable"; } diff --git a/home/gyroflow/nixos.nix b/home/gyroflow/nixos.nix index 94e86471..02b46551 100644 --- a/home/gyroflow/nixos.nix +++ b/home/gyroflow/nixos.nix @@ -6,6 +6,13 @@ in { options.home.gyroflow = { 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 = {