nix-git/modules/usb-mtp-ptp.nix

22 lines
565 B
Nix
Raw Normal View History

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
# 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
}