mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 15:22:59 +01:00
fedd7cd690
This is slightly more verbose and inconvenient, but it forces you to think about what the wrapper ownership and permissions will be.
21 lines
404 B
Nix
21 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";
|
|
};
|
|
};
|
|
}
|