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;
|
2024-04-13 14:54:15 +02:00
|
|
|
description = ''
|
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" ];
|
|
|
|
};
|
|
|
|
|
2023-11-27 01:19:27 +01:00
|
|
|
package = mkPackageOption pkgs "dmrconfig" { };
|
2018-11-07 18:34:37 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
environment.systemPackages = [ cfg.package ];
|
|
|
|
services.udev.packages = [ cfg.package ];
|
|
|
|
};
|
|
|
|
}
|