{ config, pkgs, lib, userSettings, systemSettings, ... }:
let
  #home.username = userSettings.username;
  #home.homeDirectory = "/home/"+userSettings.username;
  hostDir = "/home/${userSettings.username}/.dotfiles/user/hardware";
in
{
  ## Mouse - Using solaar and input-remapper to control my mouse's side buttons.
  #modules.services = {
    #solaar.enable = true;
    #input-remapper.enable = true;
  #};

  #home.username = userSettings.username;
  #home.homeDirectory = "/home/"+userSettings.username;

  # Terrible Hack as workaround to readonly FS: https://github.com/sezanzeb/input-remapper/issues/663
  # mkOutOfStoreSymlink allows me to create a file outside of the store. I.e., to the actual file in the repo.
  # The path actually needs to be full due to: https://github.com/nix-community/home-manager/pull/1455#issuecomment-681041818
  #homie = { config, ... }: { # ensure config is within home-manager's context

    home.packages = [ pkgs.input-remapper ];
    #home.user = { config, ... }: {
    xdg.configFile = {
      home.file.".config/input-remapper-2/config.json".source = config.lib.file.mkOutOfStoreSymlink "${hostDir}/input-remapper-2/config.json";
      home.file.".config/input-remapper-2/presets/ROCCAT ROCCAT Kone XP Air Dongle/BLENDER copy.json".source = config.lib.file.mkOutOfStoreSymlink "${hostDir}/input-remapper-2/presets/BLENDER copy.json";
    #};
  };

  # Nuphy Air75 does not make sense. This ensures:
  # - Use the regular Windows key to open the menu (swap_opt_cmd which makes more sense setting to 1.. not 0...)
  # - Use Function Keys first over media keys (fnmode=0 or 2 works, 0 does not make sense...). If this does not work, press Fn+Tab+F to toggle in your Nuphy keyboard.
  # Check the flags with: modinfo -p hid_apple
 # boot.extraModprobeConfig = ''
   # options hid_apple fnmode=2 swap_opt_cmd=0
 # '';
}
