nixpkgs/nixos/modules/programs/gphoto2.nix
pennae 16102dce2f nixos/*: replace <code> in option docs with <literal>
markdown can't represent the difference without another extension and
both the html manual and the manpage render them the same, so keeping the
distinction is not very useful on its own. with the distinction removed
we can automatically convert many options that use <code> tags to markdown.

the manpage remains unchanged, html manual does not render
differently (but class names on code tags do change from "code" to "literal").
2022-08-03 21:03:23 +02:00

31 lines
726 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
meta.maintainers = [ maintainers.league ];
###### interface
options = {
programs.gphoto2 = {
enable = mkOption {
default = false;
type = types.bool;
description = ''
Whether to configure system to use gphoto2.
To grant digital camera access to a user, the user must
be part of the camera group:
<literal>users.users.alice.extraGroups = ["camera"];</literal>
'';
};
};
};
###### implementation
config = mkIf config.programs.gphoto2.enable {
services.udev.packages = [ pkgs.libgphoto2 ];
environment.systemPackages = [ pkgs.gphoto2 ];
users.groups.camera = {};
};
}