mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 00:12:56 +00:00
fedd7cd690
This is slightly more verbose and inconvenient, but it forces you to think about what the wrapper ownership and permissions will be.
22 lines
404 B
Nix
22 lines
404 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.programs.kbdlight;
|
|
|
|
in
|
|
{
|
|
options.programs.kbdlight.enable = mkEnableOption "kbdlight";
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = [ pkgs.kbdlight ];
|
|
security.wrappers.kbdlight =
|
|
{ setuid = true;
|
|
owner = "root";
|
|
group = "root";
|
|
source = "${pkgs.kbdlight.out}/bin/kbdlight";
|
|
};
|
|
};
|
|
}
|