{pkgs, ...}: {
  home.packages = with pkgs; [
    grimblast
  ];
  # TODO: Try to isolate these variables to just Hyprland and its children
  # Maybe use systemctl --user import-environment?
  imports = [
    ../packages.nix
    ./keymaps.nix
    ./window-rules.nix
  ];
  wayland.windowManager.hyprland = {
    enable = true;
    portalPackage = pkgs.xdg-desktop-portal-hyprland;
    systemd.enableXdgAutostart = true;
    xwayland.enable = true;
    # extraConfig = ''
    #   source=~/.config/hypr/debug.conf
    # '';
    settings = {
      ecosystem = {
        no_update_news = true;
      };
      exec-once = ["systemctl --user start waylandwm-session.target"];
      general = {
        gaps_in = 2;
        gaps_out = 2;

        border_size = 2;

        # https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
        # NOTE: use stylix
        # "col.active_border" = "$lavender $pink 45deg";
        # "col.inactive_border" = "$overlay1";

        # Set to true enable resizing windows by clicking and dragging on borders and gaps
        resize_on_border = true;

        # Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
        allow_tearing = false;

        layout = "dwindle";

        no_border_on_floating = false;
      };
      xwayland = {
        force_zero_scaling = true;
      };
      input = {
        follow_mouse = 1;

        sensitivity = 0; # -1.0 - 1.0, 0 means no modification.

        touchpad = {
          natural_scroll = true;
          scroll_factor = 0.2;
        };
      };
      misc = {
        force_default_wallpaper = -1;
        disable_hyprland_logo = true;
      };

      dwindle = {
        pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
        preserve_split = true; # You probably want this
      };

      # See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
      master = {
        new_status = "slave";
      };

      animations = {
        enabled = true;

        # Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more

        bezier = [
          "easeOutQuint,0.23,1,0.32,1"
          "easeInOutCubic,0.65,0.05,0.36,1"
          "linear,0,0,1,1"
          "almostLinear,0.5,0.5,0.75,1.0"
          "quick,0.15,0,0.1,1"
        ];

        animation = [
          "global, 1, 10, default"
          "border, 1, 5.39, easeOutQuint"
          "windows, 1, 4.79, easeOutQuint"
          "windowsIn, 1, 4.1, easeOutQuint, popin 87%"
          # "windowsIn, 1, 4.1, easeOutQuint, popin 87%"
          "windowsOut, 1, 1.49, linear, popin 87%"
          "fadeIn, 1, 1.73, almostLinear"
          "fadeOut, 1, 1.46, almostLinear"
          "fade, 1, 3.03, quick"
          "layers, 1, 3.81, easeOutQuint"
          "layersIn, 1, 4, easeOutQuint, fade"
          "layersOut, 1, 1.5, linear, fade"
          "fadeLayersIn, 1, 1.79, almostLinear"
          "fadeLayersOut, 1, 1.39, almostLinear"
          "workspaces, 1, 1.94, almostLinear, slide"
          "workspacesIn, 1, 1.21, almostLinear, fade"
          "workspacesOut, 1, 1.94, almostLinear, fade"
          "specialWorkspace, 1, 1.94, almostLinear, fade"
        ];
      };

      decoration = {
        rounding = 10;

        # Change transparency of focused and unfocused windows
        # active_opacity = 1
        # inactive_opacity = 0.9
        active_opacity = 0.9;
        inactive_opacity = 0.85;

        shadow = {
          enabled = true;
          range = 4;
          render_power = 3;
          # color = "$base"; # NOTE: use stylix
        };

        # https://wiki.hyprland.org/Configuring/Variables/#blur
        blur = {
          enabled = true;
          size = 10;
          passes = 2;

          vibrancy = 0.1696;
        };
      };
    };
  };
}
