mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:19:22 +08:00
hardware.legion: fix
This commit is contained in:
@@ -62,6 +62,7 @@ inputs:
|
||||
{
|
||||
cpus = [ "amd" ];
|
||||
gpu = { type = "amd+nvidia"; prime.busId = { amd = "8:0:0"; nvidia = "1:0:0"; }; dynamicBoost = true; };
|
||||
legion = {};
|
||||
};
|
||||
packages.packageSet = "workstation";
|
||||
virtualization =
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.hardware.legion = let inherit (inputs.lib) mkOption types; in
|
||||
options.nixos.hardware.legion = let inherit (inputs.lib) mkOption types; in mkOption
|
||||
{ type = types.nullOr (types.submodule {}); default = null; };
|
||||
config = let inherit (inputs.config.nixos.hardware) legion; in inputs.lib.mkIf (legion != null)
|
||||
{
|
||||
enable = mkOption { type = types.bool; default = false; };
|
||||
environment.systemPackages = [ inputs.pkgs.lenovo-legion ];
|
||||
boot.extraModulePackages = [ inputs.config.boot.kernelPackages.lenovo-legion-module ];
|
||||
};
|
||||
config =
|
||||
let
|
||||
inherit (inputs.lib) mkIf;
|
||||
inherit (inputs.config.nixos.hardware) legion;
|
||||
in mkIf legion.enable
|
||||
{
|
||||
environment.systemPackages = [ inputs.pkgs.lenovo-legion ];
|
||||
boot.extraModulePackages = [ inputs.config.boot.kernelPackages.lenovo-legion-module ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user