nix-git/modules/usb-mtp-ptp.nix
2024-09-09 14:59:13 +02:00

22 lines
565 B
Nix

{ config, pkgs, ... }:
{
# USB MTP and PTP support
# https://wiki.archlinux.org/title/Media_Transfer_Protocol#File_manager_integration
# Mount USB MTP devices
services.gvfs.enable = true;
# Manage USB PTP devices (digital cameras)
programs.gphoto2.enable = true;
# To grant digital camera access to a user,
# the user must be part of the camera group:
users.users."yoda".extraGroups = ["camera"];
#
# Example usage:
#
# gphoto2 --auto-detect
#=> Fuji Fujifilm X-T1 usb:001,002
# gphoto2 --list-files
# gphoto2 --get-all-files
}