nixos/home/modules/pipewire-controller.nix

22 lines
629 B
Nix

{ lib, config, pkgs, ... }:
let
cfg = config.snowhawk.pipewire-controller;
in
{
options.snowhawk.pipewire-controller = {
enable = lib.mkEnableOption "pipewire-controller home-manager module";
};
config = lib.mkIf cfg.enable {
snowhawk.sxhkd.enable = lib.mkDefault true;
services.sxhkd.keybindings = lib.mkIf config.snowhawk.sxhkd.enable {
"XF86TouchpadOn" = "${lib.getExe pkgs.pipewire-controller}";
};
wayland.windowManager.hyprland.settings.bind = lib.mkIf config.wayland.windowManager.hyprland.enable [
", XF86TouchpadOn, exec, ${lib.getExe pkgs.pipewire-controller}"
];
};
}