diff --git a/disks/.config/systemd/user/default.target.wants/udiskie.service b/disks/.config/systemd/user/default.target.wants/udiskie.service new file mode 120000 index 0000000..fceef55 --- /dev/null +++ b/disks/.config/systemd/user/default.target.wants/udiskie.service @@ -0,0 +1 @@ +../udiskie.service \ No newline at end of file diff --git a/disks/.config/systemd/user/udiskie.service b/disks/.config/systemd/user/udiskie.service new file mode 100644 index 0000000..9daa44b --- /dev/null +++ b/disks/.config/systemd/user/udiskie.service @@ -0,0 +1,10 @@ +[Unit] +Description=Automated mounting of removable devices (udisks) + +[Service] +# workaround to allow relative executable invocation (i.e. current users' home dir) +ExecStart=/usr/bin/udiskie +Restart=always + +[Install] +WantedBy=default.target diff --git a/disks/.config/udiskie/config.yml b/disks/.config/udiskie/config.yml new file mode 100644 index 0000000..f105bb6 --- /dev/null +++ b/disks/.config/udiskie/config.yml @@ -0,0 +1,9 @@ +program_options: + tray: auto + automount: true + notify: true +device_config: +# ignore any snap loopback devices +# see https://github.com/coldfix/udiskie/issues/180 +- id_type: squashfs + ignore: true diff --git a/disks/README.md b/disks/README.md new file mode 100644 index 0000000..fbeab62 --- /dev/null +++ b/disks/README.md @@ -0,0 +1,9 @@ +# Removable disk configuration + +This simple unit depends on `udiskie2` being installed and enables auto-mounting of any inserted removable media. +It will additionally *ignore* any snaps managed by `snapd`, since they would otherwise be detected as loopback devices. + +Automatically installs a `systemd` service which is also enabled to start up on system start (as a user service). + +The end result is `udiskie` running in the background and automatically mounting any inserted media, +which will then also show its tray icon so that it can be quickly unmounted as well.