nixpkgs/nixos/modules/programs/kbdlight.nix
rnhmjoj fedd7cd690
nixos: explicitely set security.wrappers ownership
This is slightly more verbose and inconvenient, but it forces you
to think about what the wrapper ownership and permissions will be.
2021-09-13 13:48:13 +02:00

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";
};
};
}