From 65f568d1e76ce2844b2e22fc9f36483e78a75e77 Mon Sep 17 00:00:00 2001 From: "Alexandre Cavalheiro S. Tiago da Silva" Date: Mon, 28 Oct 2024 17:01:48 -0300 Subject: [PATCH] fix(hardware): use zenergy only in hardware specific code --- modules/nixos/system.nix | 2 -- specific/desktop/hardware.nix | 7 +++++-- specific/laptop/hardware.nix | 7 +++++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/nixos/system.nix b/modules/nixos/system.nix index e97e632..d978b46 100644 --- a/modules/nixos/system.nix +++ b/modules/nixos/system.nix @@ -8,12 +8,10 @@ boot.initrd.kernelModules = [ "amdgpu" "v4l2loopback" - "zenergy" ]; boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback - config.boot.kernelPackages.zenergy ]; boot.extraModprobeConfig = '' diff --git a/specific/desktop/hardware.nix b/specific/desktop/hardware.nix index 62e354f..006ce2c 100644 --- a/specific/desktop/hardware.nix +++ b/specific/desktop/hardware.nix @@ -1,9 +1,12 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { # Enable Zenergy + boot.initrd.kernelModules = [ + "zenergy" + ]; boot.extraModulePackages = [ - (pkgs.callPackage ../kernel/zenergy.nix { kernel = pkgs.linux_zen; }) + config.boot.kernelPackages.zenergy ]; # Enable openrazer for managing Razer products' configuration diff --git a/specific/laptop/hardware.nix b/specific/laptop/hardware.nix index 7206211..1853979 100644 --- a/specific/laptop/hardware.nix +++ b/specific/laptop/hardware.nix @@ -1,9 +1,12 @@ -{ pkgs, ... }: +{ config, ... }: { # Enable Zenergy + boot.initrd.kernelModules = [ + "zenergy" + ]; boot.extraModulePackages = [ - (pkgs.callPackage ../kernel/zenergy.nix { kernel = pkgs.linux_zen; }) + config.boot.kernelPackages.zenergy ]; # enable a better driver for wireless xbox controllers.