2018-11-07 18:34:37 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.programs.dmrconfig;
|
|
|
|
|
|
|
|
in {
|
2022-07-14 14:39:58 +02:00
|
|
|
meta.maintainers = with maintainers; [ ];
|
2018-11-07 18:34:37 +01:00
|
|
|
|
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
programs.dmrconfig = {
|
|
|
|
enable = mkOption {
|
|
|
|
default = false;
|
|
|
|
type = types.bool;
|
2022-07-28 23:19:15 +02:00
|
|
|
description = lib.mdDoc ''
|
2018-11-07 18:34:37 +01:00
|
|
|
Whether to configure system to enable use of dmrconfig. This
|
|
|
|
enables the required udev rules and installs the program.
|
|
|
|
'';
|
|
|
|
relatedPackages = [ "dmrconfig" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
default = pkgs.dmrconfig;
|
|
|
|
type = types.package;
|
2021-10-03 18:06:03 +02:00
|
|
|
defaultText = literalExpression "pkgs.dmrconfig";
|
2022-07-28 23:19:15 +02:00
|
|
|
description = lib.mdDoc "dmrconfig derivation to use";
|
2018-11-07 18:34:37 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
services.udev.packages = [ cfg.package ];
|
|
|
|
};
|
|
|
|
}
|