{
  inputs,
  lib,
  config,
  pkgs,
  ...
}:
{
  services.udev = {
    extraRules = ''
      		KERNEL=="ttyACM0", MODE:="666"
      		ACTION=="add", KERNEL=="sd[a-e][0-9]", ENV{ID_FS_UUID}=="3039-3932", RUN+="${pkgs.systemd}/bin/systemd-mount --no-block -A -G -o gid=users,fmask=113,dmask=002 /dev/%k /mnt/sdcard"
      		ACTION=="add", KERNEL=="sd[a-e]", ENV{ID_FS_UUID}=="66BA-4EBA", RUN+="${pkgs.systemd}/bin/systemd-mount --no-block -A -G -o gid=users,fmask=113,dmask=002 /dev/%k /mnt/kobo"
      		KERNEL=="uinput", GROUP="input", MODE="0660", OPTIONS+="static_node=uinput"
      	'';
    packages = with pkgs; [
      vial
      via
    ];
  };
  home-manager.users.fw = {
    xdg.mimeApps = {
      enable = true;
      defaultApplications = {
        "text/html" = "librewolf.desktop";
        "x-scheme-handler/http" = "librewolf.desktop";
        "x-scheme-handler/https" = "librewolf.desktop";
        "x-scheme-handler/about" = "librewolf.desktop";
        "x-scheme-handler/unknown" = "librewolf.desktop";
        "text/plain" = "nvim.desktop";
        "text/markdown" = "nvim.desktop";
        "text/x-markdown" = "nvim.desktop";
        "application/json" = "nvim.desktop";
        "application/x-ndjson" = "nvim.desktop";
        "application/x-yaml" = "nvim.desktop";
        "text/yaml" = "nvim.desktop";
        "text/x-shellscript" = "nvim.desktop";
        "text/x-python" = "nvim.desktop";
        "text/x-csrc" = "nvim.desktop";
        "text/x-c++src" = "nvim.desktop";
        "application/x-sql" = "nvim.desktop";
        "text/xml" = "nvim.desktop";
        "application/xml" = "nvim.desktop";
        "application/pdf" = "org.gnome.Evince.desktop";
        "image/jpeg" = "feh.desktop";
        "image/png" = "feh.desktop";
        "image/gif" = "feh.desktop";
        "image/webp" = "feh.desktop";
        "image/tiff" = "feh.desktop";
        "image/bmp" = "feh.desktop";
        "image/svg+xml" = "feh.desktop";
      };
    };
  };
  environment.sessionVariables.DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf";

  environment.systemPackages = with pkgs; [
    # GUI
    feishin
    vscode
    signal-desktop
    thunderbird
    discord
    slack
    evince
    spotify
    firefox
    ipcalc
    vial
    via
    remmina
    brightnessctl
    speedcrunch
	wf-recorder
	slurp
	lagrange
	jujutsu
	rclone
    quickemu
    virt-viewer
    go-passbolt-cli
    wf-recorder
    slurp
    bitwarden-desktop
    jira-cli-go

    dbeaver-bin
    (
      let
        base = pkgs.appimageTools.defaultFhsEnvArgs;
      in
      pkgs.buildFHSEnv (
        base
        // {
          name = "fhs";
          targetPkgs =
            pkgs:
            # pkgs.buildFHSUserEnv provides only a minimal FHS environment,
            # lacking many basic packages needed by most software.
            # Therefore, we need to add them manually.
            #
            # pkgs.appimageTools provides basic packages required by most software.
            (base.targetPkgs pkgs)
            ++ (with pkgs; [
              pkg-config
              ncurses
              icu
              # Feel free to add more packages here if needed.
            ]);
          profile = "export FHS=1";
          runScript = "bash";
          extraOutputsToInstall = [ "dev" ];
        }
      )
    )

    # TUI
    # nodejs
    claude-code

    # Browsers
    librewolf

    # Displaying
    zathura
    feh
    mpv

    # System
    pavucontrol
    pulseaudio
    devour
    caligula
    ptouch-print

    # Transforms
    yt-dlp
    imagemagick
    pandoc
    pinta
    pastel
    ffmpeg
    # darktable
  ];
}
