{
  pkgs,
  lib,
  fetchurl,
  hostname,
  headless,
  ...
}: let
  packages = with pkgs; [
    age
    curl
    direnv
    docker
    elixir
    elixir_ls
    entr
    erlang
    fd
    feh
    fzf
    gcc
    go
    gopls
    htop
    jq
    minisign
    (nerdfonts.override {fonts = ["Iosevka"];})
    nnn
    nodejs
    oh-my-zsh
    ripgrep
    rust-analyzer
    unzip
    wget
    zip
    zsh
  ];

  defaultUser = "deck";
in {
  imports = [
    ../configs/system
    ./docker.nix
  ];

  fonts.fontconfig.enable = true;

  home = {
    username = defaultUser;
    homeDirectory = "/home/${defaultUser}";
    sessionPath = [
      "$HOME/go/bin"
      "$HOME/bin"
    ];

    file = {
      ".icons/default".source = "${pkgs.capitaine-cursors}/share/icons/capitaine-cursors";
    };

    packages = packages;

    keyboard = {
      layout = "gb";
      options = [
        "caps:escape"
      ];
    };

    stateVersion = "23.05";
  };

  programs = {
    # Let Home Manager install and manage itself.
    home-manager.enable = true;

    fzf = {
      enable = true;
      enableZshIntegration = true;
    };

    git = {
      enable = true;
      package = pkgs.gitFull;
      userName = "Daniel Patterson";
      userEmail = "me@danielpatterson.dev";
      extraConfig = {
        pull.rebase = true;
        init.defaultBranch = "main";
        format.signOff = "yes";
        sendemail = {
          smtpUser = "me@danielpatterson.dev";
          smtpServer = "smtp.fastmail.com";
          smtpEncryption = "tls";
          smtpServerPort = 587;
        };
      };
    };

    lazygit = {
      enable = true;
      settings = {
        gui.theme = {
          selectedLineBgColor = ["reverse"];
          selectedRangeBgColor = ["reverse"];
        };
      };
    };

    starship = {
      enable = true;
      settings = {
        elixir = {
          disabled = true;
        };
      };
    };

    vscode.enable = true;

    zsh = {
      enable = true;
      enableAutosuggestions = true;
      initExtra = ''
        if [ -n "$TMUX" ]; then
          setopt ignoreeof
        fi
        eval "$(direnv hook zsh)"
      '';
      oh-my-zsh = {
        enable = true;
        plugins = ["git" "fzf"];
        theme = "agnoster";
      };
    };
  };
}
