2021-05-03 20:48:10 +00:00
|
|
|
{ pkgs, lib, config, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.feedbackd;
|
|
|
|
in {
|
|
|
|
options = {
|
|
|
|
programs.feedbackd = {
|
2022-09-09 14:08:57 +00:00
|
|
|
enable = mkEnableOption (lib.mdDoc ''
|
2021-05-03 20:48:10 +00:00
|
|
|
Whether to enable the feedbackd D-BUS service and udev rules.
|
|
|
|
|
|
|
|
Your user needs to be in the `feedbackd` group to trigger effects.
|
2022-09-09 14:08:57 +00:00
|
|
|
'');
|
2021-05-03 20:48:10 +00:00
|
|
|
package = mkOption {
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc ''
|
2021-05-03 20:48:10 +00:00
|
|
|
Which feedbackd package to use.
|
|
|
|
'';
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.feedbackd;
|
2021-10-06 13:57:05 +00:00
|
|
|
defaultText = literalExpression "pkgs.feedbackd";
|
2021-05-03 20:48:10 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
|
|
|
|
services.dbus.packages = [ cfg.package ];
|
|
|
|
services.udev.packages = [ cfg.package ];
|
|
|
|
|
|
|
|
users.groups.feedbackd = {};
|
|
|
|
};
|
|
|
|
}
|