{
  lib,
  pkgs,
  namespace,
  ...
}:
let
  inherit (lib.${namespace}) enabled;
  # Displays
  display = {
    input = "eDP-1";
    resolution = "3456x2234";
    refreshRate = "60.00000";
  };
in
{

  home.username = "matt";
  home.homeDirectory = "/home/matt";
  home.stateVersion = "23.11";

  ${namespace} = {
    programs.hyprland = {
      enable = true;
      primaryDisplay = "eDP-1";
      debug.disableScaleChecks = true;

      monitorv2 = [
        {
          name = display.input;
          mode = "${display.resolution}@${display.refreshRate}";
          position = "0x0";
          scale = 1.25;
          extra = [
            "bitdepth"
            "10"
            "cm"
            "hdr"
            "sdrbrightness"
            "1.2"
            "sdrsaturation"
            "0.98"
          ];
        }
      ];

      workspace = [
        "name:firefox, monitor:${display.input}, default:false, special, class:(.*firefox.*)"
        "name:discord, monitor:${display.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)"
        "name:steam, monitor:${display.input}, default:false, special, class:(.*[Ss]team.*)"
      ];

      windowRule = [
        "size 2160 3356, tag:horizonrdp"
      ];

      hyprpaper = {
        wallpaperPath = "/run/wallpaper.jpg";
      };

      keybinds = {
        bind = [
          "$mod, A, exec, chromium --app=\"https://music.apple.com\""

          "SHIFT, XF86MonBrightnessUp, exec, lightctl -D kbd_backlight up"
          "SHIFT, XF86MonBrightnessDown, exec, lightctl -D kbd_backlight down"
        ];
      };

      defaultApps = {
        browser = pkgs.firefox;
      };

      extraConfig = ''
        exec-once = brightnessctl -d kbd_backlight s 50%
      '';
    };
    programs = {
      btop = enabled;
      kitty = {
        enable = true;
      };
      mako = {
        enable = true;
      };
      nwg-dock = enabled;
      nwg-drawer = enabled;
      nwg-panel = {
        enable = true;
        defaultApps = {
          browser = pkgs.firefox;
        };
      };
      waybar = {
        enable = true;

        layer = "bottom";

        temperature = {
          cpu = enabled;
          gpu = enabled;
        };

        extraModules = {
          "custom/lights" = {
            tooltip = false;
            exec = "waybar-hass --get_light light.living_room_lights";
            interval = "once";
            format = "{text}"; # "󱉓";
            on-click = "waybar-hass --toggle_light light.living_room_lights";
            return-type = "json";
          };
        };

        extraModulesStyle = ''
          #custom-lights {
            color: @base0C;
            opacity: 0.85;
            background-color: @base00;
          }

          #custom-lights:hover {
            background: @base03;
          }
        '';

        windowOffset = 75;
      };
      wlogout = enabled;
      wofi = enabled;
    };
  };

  home.packages =
    with pkgs.${namespace};
    [
      # librepods
    ]
    ++ (with pkgs; [
      bolt-launcher
      iw
      iwd
      orca-slicer
      vscodium
    ]);
  
  services = {
    kdeconnect = {
      enable = lib.mkForce true;
      indicator = lib.mkForce true;
    };
  };

  programs = {
    password-store = enabled;
  };
}
