{ lib, pkgs, ... }:
{
  services.udisks2.enable = true;
  # fix reliance on nonexistent graphical-session-pre.target
  systemd.user.services.udiskie = {
    unitConfig = {
      Description = "udiskie mount daemon";
      After = [
        "graphical-session.target"
        "niri.target"
      ];
      PartOf = [
        "sysinit-reactivation.target"
        "graphical-session.target"
      ];
    };
    serviceConfig.ExecStart = [ (lib.getExe' pkgs.udiskie "udiskie") ];

    wantedBy = [ "graphical-session.target" ];
  };
}
