at 24.11-pre 714 B view raw
1{ config, lib, pkgs, ... }: 2 3{ 4 meta.maintainers = [ lib.maintainers.league ]; 5 6 ###### interface 7 options = { 8 programs.gphoto2 = { 9 enable = lib.mkOption { 10 default = false; 11 type = lib.types.bool; 12 description = '' 13 Whether to configure system to use gphoto2. 14 To grant digital camera access to a user, the user must 15 be part of the camera group: 16 `users.users.alice.extraGroups = ["camera"];` 17 ''; 18 }; 19 }; 20 }; 21 22 ###### implementation 23 config = lib.mkIf config.programs.gphoto2.enable { 24 services.udev.packages = [ pkgs.libgphoto2 ]; 25 environment.systemPackages = [ pkgs.gphoto2 ]; 26 users.groups.camera = {}; 27 }; 28}