mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 16:33:15 +00:00
0a37316d6c
This commit replaces a lot of usages of `mkOption` with the package type, to be `mkPackageOption`, in order to reduce the amount of code.
27 lines
586 B
Nix
27 lines
586 B
Nix
{ pkgs, lib, config, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.programs.feedbackd;
|
|
in {
|
|
options = {
|
|
programs.feedbackd = {
|
|
enable = mkEnableOption (lib.mdDoc ''
|
|
the feedbackd D-BUS service and udev rules.
|
|
|
|
Your user needs to be in the `feedbackd` group to trigger effects
|
|
'');
|
|
package = mkPackageOption pkgs "feedbackd" { };
|
|
};
|
|
};
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
services.dbus.packages = [ cfg.package ];
|
|
services.udev.packages = [ cfg.package ];
|
|
|
|
users.groups.feedbackd = {};
|
|
};
|
|
}
|