mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
ef176dcf7e
conversions were done using https://github.com/pennae/nix-doc-munge using (probably) rev f34e145 running nix-doc-munge nixos/**/*.nix nix-doc-munge --import nixos/**/*.nix the tool ensures that only changes that could affect the generated manual *but don't* are committed, other changes require manual review and are discarded.
41 lines
872 B
Nix
41 lines
872 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
cfg = config.programs.k40-whisperer;
|
|
pkg = cfg.package.override {
|
|
udevGroup = cfg.group;
|
|
};
|
|
in
|
|
{
|
|
options.programs.k40-whisperer = {
|
|
enable = mkEnableOption (lib.mdDoc "K40-Whisperer");
|
|
|
|
group = mkOption {
|
|
type = types.str;
|
|
description = lib.mdDoc ''
|
|
Group assigned to the device when connected.
|
|
'';
|
|
default = "k40";
|
|
};
|
|
|
|
package = mkOption {
|
|
type = types.package;
|
|
default = pkgs.k40-whisperer;
|
|
defaultText = literalExpression "pkgs.k40-whisperer";
|
|
example = literalExpression "pkgs.k40-whisperer";
|
|
description = lib.mdDoc ''
|
|
K40 Whisperer package to use.
|
|
'';
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
users.groups.${cfg.group} = {};
|
|
|
|
environment.systemPackages = [ pkg ];
|
|
services.udev.packages = [ pkg ];
|
|
};
|
|
}
|