{
  pkgs,
  lib,
  config,
  ...
}: let
  HOSTNAME = "nixos";
in {
  imports = [./stylix.nix];
  xdg.configFile."shell".source = lib.getExe pkgs.brush;
  xdg.configFile."sway/config".source = lib.mkForce ./sway_config;
  wayland.windowManager.sway.enable = true;
  home = {
    username = "mtgmonkey";
    homeDirectory = "/home/mtgmonkey";
    stateVersion = "26.05";
    packages = [
      pkgs.acpi
      pkgs.alacritty
      pkgs.anki
      pkgs.brightnessctl
      pkgs.brush
      pkgs.dust
      pkgs.element-desktop
      pkgs.fzf
      pkgs.glow
      pkgs.grim
      pkgs.jmtpfs
      pkgs.nix-output-monitor
      pkgs.ranger
      pkgs.rip2
      pkgs.ripgrep
      pkgs.slurp
      pkgs.tree
      pkgs.zoxide
    ];
  };
  programs = {
    alacritty.enable = true;
    bash = {
      enable = true;
      shellAliases = {
        neofetch = "fastfetch";
        ls = "lsd";
        ll = "lsd -l";
        l = "lsd -la";
        cd = "z";
        gg = "git log --oneline --abbrev-commit --all --graph --decorate --color";
        md = "glow";
      };
      bashrcExtra = ''
        PS1="\u@\h:\w$"
        eval "$(zoxide init bash)"
      '';
    };
    btop = {
      enable = true;
      settings = {
        theme_background = false;
        vim_keys = true;
        rounded_corners = false;
        graph_symbol = "braille";
        update_ms = 150;
        proc_sorting = "cpu lazy";
        proc_gradient = false;
        proc_left = true;
        cpu_single_graph = true;
        cpu_bottom = true;
        clock_format = "/user@/host:/uptime@%H:%M";
        background_update = true;
        mem_graphs = false;
        mem_below_net = true;
        show_swap = false;
        only_physical = true;
        show_io_stat = true;
        io_mode = false;
        io_graph_combined = false;
      };
    };
    fastfetch.enable = true;
    git = {
      enable = true;
      settings = {
        user = {
          name = config.home.username;
          email = "${config.home.username}@${HOSTNAME}";
        };
        init.defaultBranch = "master";
        http.postBuffer = 524288000;
      };
    };
    gh.enable = true;
    home-manager.enable = true;
    librewolf = {
      enable = true;
      package = pkgs.librewolf.override {
        cfg.enableTridactylNative = true;
      };
      profiles.${config.home.username}.extensions.packages = [
        pkgs.nur.repos.rycee.firefox-addons.tridactyl
      ];
    };
    lsd.enable = true;
    nvf = {
      enable = true;
      settings.vim = {
        autocomplete.nvim-cmp.enable = false;
        formatter.conform-nvim = {
          enable = true;
          setupOpts.format_on_save = {
            lsp_format = "fallback";
            timeout_ms = 5000;
          };
        };
        lsp.otter-nvim.enable = true;
        git.enable = true;
        keymaps = [
          {
            key = "<Down>";
            mode = ["i" "n" "v" "c"];
            action = "<NOP>";
          }
          {
            key = "<Up>";
            mode = ["i" "n" "v" "c"];
            action = "<NOP>";
          }
          {
            key = "<Left>";
            mode = ["i" "n" "v" "c"];
            action = "<NOP>";
          }
          {
            key = "<Right>";
            mode = ["i" "n" "v" "c"];
            action = "<NOP>";
          }
          {
            key = "jj";
            mode = ["i"];
            action = "<Esc>";
          }
          {
            key = "kk";
            mode = ["i"];
            action = "<Esc>";
          }
          {
            key = "jk";
            mode = ["i"];
            action = "<Esc>";
          }
          {
            key = "kj";
            mode = ["i"];
            action = "<Esc>";
          }
          {
            key = "<Esc>";
            mode = ["i"];
            action = "<Nop>";
          }
        ];
        languages = {
          nix = {
            enable = true;
            format.enable = true;
            lsp.enable = true;
          };
          haskell = {
            enable = true;
            lsp.enable = true;
          };
        };
        lineNumberMode = "relative";
        options = {
          tabstop = 2;
          shiftwidth = 2;
          expandtab = true;
          smarttab = true;
          foldmethod = "indent";
          number = true;
          colorcolumn = "80";
        };
        statusline.lualine.enable = true;
        syntaxHighlighting = true;
      };
    };
    ssh.enable = true;
  };
}
