diff options
author | dje4321 <dje4321@gmail.com> | 2018-06-16 17:15:42 -0500 |
---|---|---|
committer | Matthew Justin Bauer <mjbauer95@gmail.com> | 2018-06-16 18:15:42 -0400 |
commit | 1b7ce4c6d5f5f3882326b71f89803af5bf1f5053 (patch) | |
tree | ad948a3942dc1a6d0671fb2cc04a9358e7041b6b /nixos | |
parent | abdbb38d03be7854f39d57e28e4fdfcac066ff1c (diff) | |
download | nixpkgs-1b7ce4c6d5f5f3882326b71f89803af5bf1f5053.tar nixpkgs-1b7ce4c6d5f5f3882326b71f89803af5bf1f5053.tar.gz nixpkgs-1b7ce4c6d5f5f3882326b71f89803af5bf1f5053.tar.bz2 nixpkgs-1b7ce4c6d5f5f3882326b71f89803af5bf1f5053.tar.lz nixpkgs-1b7ce4c6d5f5f3882326b71f89803af5bf1f5053.tar.xz nixpkgs-1b7ce4c6d5f5f3882326b71f89803af5bf1f5053.tar.zst nixpkgs-1b7ce4c6d5f5f3882326b71f89803af5bf1f5053.zip |
brightnessctl: init at 0.3.2 (#42102)
* brightnessctl: init at 0.3.2 * Revised PR
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/hardware/brightnessctl.nix | 30 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 |
2 files changed, 31 insertions, 0 deletions
diff --git a/nixos/modules/hardware/brightnessctl.nix b/nixos/modules/hardware/brightnessctl.nix new file mode 100644 index 00000000000..341e4b791c2 --- /dev/null +++ b/nixos/modules/hardware/brightnessctl.nix @@ -0,0 +1,30 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.hardware.brightnessctl; +in +{ + + options = { + + hardware.brightnessctl = { + + enable = mkOption { + default = false; + type = types.bool; + description = '' + Enable brightnessctl in userspace. + This will allow brightness control from users in the video group. + ''; + + }; + }; + }; + + + config = mkIf cfg.enable { + services.udev.packages = with pkgs; [ brightnessctl ]; + }; + +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index e45909eb2d6..cd594b934b8 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -29,6 +29,7 @@ ./config/vpnc.nix ./config/zram.nix ./hardware/all-firmware.nix + ./hardware/brightnessctl.nix ./hardware/ckb.nix ./hardware/cpu/amd-microcode.nix ./hardware/cpu/intel-microcode.nix |