2024-09-09 14:59:13 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
# USB MTP and PTP support
|
|
|
|
# https://wiki.archlinux.org/title/Media_Transfer_Protocol#File_manager_integration
|
|
|
|
|
2025-01-19 12:11:34 +01:00
|
|
|
# Mount USB MTP devices.
|
|
|
|
# E.g. via GNOME files.
|
2024-09-09 14:59:13 +02:00
|
|
|
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
|
|
|
|
}
|