mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-01 05:04:40 +00:00
36 lines
795 B
Nix
36 lines
795 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.programs.entropy;
|
|
inherit (lib) mkIf;
|
|
in
|
|
{
|
|
options.programs.entropy = {
|
|
enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = ''
|
|
Enables the Entropy keyboard configurator and sets up necessary
|
|
udev rules for Vial-QMK/RMK compatible devices.
|
|
This allows configuring programmable keyboards without root privileges.
|
|
Ensure your user is a member of the 'plugdev' group after enabling.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
users.groups.plugdev = { };
|
|
|
|
environment.systemPackages = [ pkgs.ergohaven-entropy ];
|
|
|
|
services.udev.packages = [ pkgs.ergohaven-entropy ];
|
|
|
|
i18n.inputMethod.ibus.engines = [ pkgs.ergohaven-entropy ];
|
|
};
|
|
}
|