peripherals/razer: add razer hardware module
This commit is contained in:
parent
c1ed58de3e
commit
afa497d9ea
2 changed files with 23 additions and 0 deletions
|
@ -20,6 +20,8 @@
|
||||||
gpu.nvidia = true;
|
gpu.nvidia = true;
|
||||||
wireless.enable = true;
|
wireless.enable = true;
|
||||||
form.desktop = true;
|
form.desktop = true;
|
||||||
|
|
||||||
|
peripherals.razer.enable = true;
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
foldingathome = {
|
foldingathome = {
|
||||||
|
|
21
modules/modules/hardware/peripherals/razer.nix
Normal file
21
modules/modules/hardware/peripherals/razer.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
# from https://github.com/hlissner/dotfiles/blob/master/modules/hardware/razer.nix
|
||||||
|
{ options, config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
with lib.hlissner;
|
||||||
|
let cfg = config.modules.hardware.peripherals.razer;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.hardware.peripherals.razer = {
|
||||||
|
enable = mkBoolOpt false;
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
hardware.openrazer = {
|
||||||
|
enable = true;
|
||||||
|
users = [ config.user.name ];
|
||||||
|
};
|
||||||
|
|
||||||
|
user.extraGroups = [ "plugdev" ];
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue