usb mtp and ptp

This commit is contained in:
Daniel Langbein 2024-09-09 14:59:13 +02:00
parent 3acfe2274d
commit d04df63be4
Signed by: langfingaz
GPG Key ID: 6C47C753F0823002
3 changed files with 23 additions and 0 deletions

View File

@ -10,6 +10,7 @@
../../modules/base-efi.nix ../../modules/base-efi.nix
../../modules/xdg.nix ../../modules/xdg.nix
../../modules/power-management.nix ../../modules/power-management.nix
../../modules/usb-mtp-ptp.nix
../../modules/ntfs.nix ../../modules/ntfs.nix
../../modules/git.nix ../../modules/git.nix
../../modules/zsh.nix ../../modules/zsh.nix

View File

@ -11,6 +11,7 @@
../../modules/base-efi.nix ../../modules/base-efi.nix
../../modules/xdg.nix ../../modules/xdg.nix
../../modules/power-management.nix ../../modules/power-management.nix
../../modules/usb-mtp-ptp.nix
../../modules/tuxedo-rs.nix ../../modules/tuxedo-rs.nix
../../modules/ntfs.nix ../../modules/ntfs.nix
../../modules/git.nix ../../modules/git.nix

21
modules/usb-mtp-ptp.nix Normal file
View File

@ -0,0 +1,21 @@
{ 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
}