nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

tp-auto-kbbl: init at 0.1.5

+94
+1
nixos/modules/module-list.nix
··· 592 592 ./services/misc/sysprof.nix 593 593 ./services/misc/taskserver 594 594 ./services/misc/tiddlywiki.nix 595 + ./services/misc/tp-auto-kbbl.nix 595 596 ./services/misc/tzupdate.nix 596 597 ./services/misc/uhub.nix 597 598 ./services/misc/weechat.nix
+58
nixos/modules/services/misc/tp-auto-kbbl.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + 5 + let cfg = config.services.tp-auto-kbbl; 6 + 7 + in { 8 + meta.maintainers = with maintainers; [ sebtm ]; 9 + 10 + options = { 11 + services.tp-auto-kbbl = { 12 + enable = mkEnableOption "Auto toggle keyboard back-lighting on Thinkpads (and maybe other laptops) for Linux"; 13 + 14 + package = mkOption { 15 + type = types.package; 16 + default = pkgs.tp-auto-kbbl; 17 + defaultText = literalExample "pkgs.tp-auto-kbbl"; 18 + description = "Package providing <command>tp-auto-kbbl</command>."; 19 + }; 20 + 21 + arguments = mkOption { 22 + type = types.listOf types.str; 23 + default = [ ]; 24 + description = '' 25 + List of arguments appended to <literal>./tp-auto-kbbl --device [device] [arguments]</literal> 26 + ''; 27 + }; 28 + 29 + device = mkOption { 30 + type = types.str; 31 + default = "/dev/input/event0"; 32 + description = "Device watched for activities."; 33 + }; 34 + 35 + }; 36 + }; 37 + 38 + config = mkIf cfg.enable { 39 + environment.systemPackages = [ cfg.package ]; 40 + 41 + systemd.services.tp-auto-kbbl = { 42 + serviceConfig = { 43 + ExecStart = concatStringsSep " " 44 + ([ "${cfg.package}/bin/tp-auto-kbbl" "--device ${cfg.device}" ] ++ cfg.arguments); 45 + Restart = "always"; 46 + Type = "simple"; 47 + }; 48 + 49 + unitConfig = { 50 + Description = "Auto toggle keyboard backlight"; 51 + Documentation = "https://github.com/saibotd/tp-auto-kbbl"; 52 + After = [ "dbus.service" ]; 53 + }; 54 + 55 + wantedBy = [ "multi-user.target" ]; 56 + }; 57 + }; 58 + }
+33
pkgs/tools/system/tp-auto-kbbl/default.nix
··· 1 + { lib 2 + , fetchFromGitHub 3 + , rustPlatform 4 + , dbus 5 + , pkg-config 6 + , openssl 7 + , libevdev 8 + }: 9 + 10 + rustPlatform.buildRustPackage rec { 11 + pname = "tp-auto-kbbl"; 12 + version = "0.1.5"; 13 + 14 + src = fetchFromGitHub { 15 + owner = "saibotd"; 16 + repo = pname; 17 + rev = version; 18 + sha256 = "0db9h15zyz2sq5r1qmq41288i54rhdl30qy08snpsh6sx2q4443y"; 19 + }; 20 + 21 + cargoSha256 = "0m1gcvshbd9cfb0v6f86kbcfjxb4p9cxynmxgi4nxkhaszfyf56c"; 22 + 23 + nativeBuildInputs = [ pkg-config ]; 24 + buildInputs = [ dbus libevdev openssl ]; 25 + 26 + meta = with lib; { 27 + description = "Auto toggle keyboard back-lighting on Thinkpads (and maybe other laptops) for Linux"; 28 + homepage = "https://github.com/saibotd/tp-auto-kbbl"; 29 + license = licenses.mit; 30 + maintainers = with maintainers; [ sebtm ]; 31 + platforms = platforms.linux; 32 + }; 33 + }
+2
pkgs/top-level/all-packages.nix
··· 32267 32267 32268 32268 thinkfan = callPackage ../tools/system/thinkfan { }; 32269 32269 32270 + tp-auto-kbbl = callPackage ../tools/system/tp-auto-kbbl { }; 32271 + 32270 32272 tup = callPackage ../development/tools/build-managers/tup { }; 32271 32273 32272 32274 tusk = callPackage ../applications/office/tusk { };