mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 20:03:16 +00:00
1301bdb185
link to search.nixos.org instead of pulling package metadata out of pkgs. this lets us cache docs of a few more modules and provides easier access to package info from the HTML manual, but makes the manpage slightly less useful since package description are no longer rendered.
39 lines
875 B
Nix
39 lines
875 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.programs.dmrconfig;
|
|
|
|
in {
|
|
meta.maintainers = [ maintainers.etu ];
|
|
|
|
###### interface
|
|
options = {
|
|
programs.dmrconfig = {
|
|
enable = mkOption {
|
|
default = false;
|
|
type = types.bool;
|
|
description = ''
|
|
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;
|
|
defaultText = literalExpression "pkgs.dmrconfig";
|
|
description = "dmrconfig derivation to use";
|
|
};
|
|
};
|
|
};
|
|
|
|
###### implementation
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = [ cfg.package ];
|
|
services.udev.packages = [ cfg.package ];
|
|
};
|
|
}
|