{
  lib,
  config,
  pkgs,
  ...
}: let
  cfg = config.marleyos.services.udiskie;
in {
  options.marleyos.services.udiskie.enable = lib.mkEnableOption "udiskie";

  config = lib.mkIf (cfg.enable && pkgs.stdenv.isLinux) {
    services.udiskie = {
      enable = true;
      settings = {
        program_options = {
          file_manager = "${lib.getExe config.marleycfg.apps.file-browser}";
        };
      };
    };
  };
}
