mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00

Separate it from `feedbackd` for the following reasons: - Previously the update script did not see this "package" and did not update it - Now we can run the test suite of `feedbackd-device-themes` - This allows a user to only change a device theme, while not recompiling `feedbackd` - Updating only `feedbackd-device-themes` would result in an awkward commit message where we would claim to update a seemingly non-existing package - Previous commits that updated both `feedbackd` and `feedbackd-device-themes` at the same time did not mention the update to `feedbackd-device-themes` in the title of the commit message - They are separate projects after all, with the only direct dependency between the two packages existing in the test suite of `feedbackd-device-themes` - [Most other distributions also package this package](https://repology.org/project/feedbackd-device-themes/versions) separately from feedbackd
37 lines
892 B
Nix
37 lines
892 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
|
|
let
|
|
cfg = config.programs.feedbackd;
|
|
in
|
|
{
|
|
options = {
|
|
programs.feedbackd = {
|
|
enable = lib.mkEnableOption ''
|
|
the feedbackd D-BUS service and udev rules.
|
|
|
|
Your user needs to be in the `feedbackd` group to trigger effects
|
|
'';
|
|
package = lib.mkPackageOption pkgs "feedbackd" { };
|
|
theme-package = lib.mkPackageOption pkgs "feedbackd-device-themes" {
|
|
nullable = true;
|
|
};
|
|
};
|
|
};
|
|
config = lib.mkIf cfg.enable {
|
|
environment.systemPackages = [
|
|
cfg.package
|
|
] ++ (if cfg.theme-package != null then [ cfg.theme-package ] else [ ]);
|
|
|
|
services.dbus.packages = [ cfg.package ];
|
|
services.udev.packages = [ cfg.package ];
|
|
|
|
# TODO: also enable systemd unit fbd-alert-slider for OnePlus 6/6T devices, see release notes of feedbackd v0.5.0
|
|
|
|
users.groups.feedbackd = { };
|
|
};
|
|
}
|