{user}: {
  lib,
  pkgs,
  config,
  ...
}:
with lib; let
  cfg = config.roles.laptop;
in {
  options.roles = {
    laptop = {
      enable = mkEnableOption "is a laptop";
      displays = mkEnableOption "laptop display defaults";
    };
  };

  config = mkIf cfg.enable {
    displays = mkIf cfg.displays {
      enable = true;
      displays.internal = {
        name = "eDP-1";
        scaling = 1.2;
      };
    };
    keyboard.dvorak.enable = true;

    home-manager.users.${user}.imports = [
      {
        wayland.windowManager.hyprland = {
          settings = {
            general = {
              gaps_out = 10;
              border_size = 3;
            };
            bind = [
              "SUPER_SHIFT, Q, killactive,"
            ];
            "device:at-translated-set-2-keyboard" = {
              kb_variant = ",dvorak";
              kb_layout = "gb,gb";
              kb_options = "grp:alt_shift_toggle,caps:escape";
            };
          };
        };
      }
    ];
  };
}
