mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 01:39:10 +08:00
hardware.legion: init
This commit is contained in:
parent
c8e0c74535
commit
8ef28b9de5
@ -134,6 +134,7 @@
|
||||
joystick.enable = true;
|
||||
printer.enable = true;
|
||||
sound.enable = true;
|
||||
legion.enable = true;
|
||||
};
|
||||
packages.packageSet = "workstation";
|
||||
virtualization =
|
||||
|
@ -1,5 +1,6 @@
|
||||
inputs:
|
||||
{
|
||||
imports = inputs.localLib.mkModules [ ./legion.nix ];
|
||||
options.nixos.hardware = let inherit (inputs.lib) mkOption types; in
|
||||
{
|
||||
bluetooth.enable = mkOption { type = types.bool; default = false; };
|
||||
|
16
modules/hardware/legion.nix
Normal file
16
modules/hardware/legion.nix
Normal file
@ -0,0 +1,16 @@
|
||||
inputs:
|
||||
{
|
||||
options.nixos.hardware.legion = let inherit (inputs.lib) mkOption types; in
|
||||
{
|
||||
enable = mkOption { type = types.bool; default = false; };
|
||||
};
|
||||
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 ];
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user