{ config, lib, pkgs, ... }:
{
  home = {
    enableNixpkgsReleaseCheck = lib.mkDefault false;
    homeDirectory = lib.mkDefault "/home/${config.home.username}";
    packages = with pkgs; [
      age
      chromium
      clinfo
      cpufetch
      deadnix
      direnv
      firefox
      gamescope
      gamescope-wsi
      goverlay
      gparted
      lm_sensors
      mission-center
      nano
      nixfmt-rfc-style
      pciutils
      protonup
      rsync
      smartmontools
      sops
      tailscale
      tree
      usbutils
      vesktop
      vim
      vulkan-tools
      wget
    ];

    stateVersion = lib.mkDefault "23.11";
  };

  programs = {
    btop.enable = lib.mkDefault true;
    fastfetch.enable = lib.mkDefault true;
    home-manager.enable = lib.mkDefault true;
    java.enable = lib.mkDefault true;
    mangohud.enable = lib.mkDefault true;
    password-store.enable = true;
    nh = {
      enable = true;
      flake = "/etc/nixos";
    };

    micro = {
      enable = true;
      settings = {
        autoindent = true;
        autosu = true;
        eofnewline = true;
        tabsize = 4;
        tabstospaces = true;
      };
    };

    tmux = {
      enable = true;
      terminal = "screen-256color";
      sensibleOnTop = true;
      focusEvents = true;
      newSession = true;
      mouse = true;
      plugins = with pkgs; [
        tmuxPlugins.cpu
        {
          plugin = tmuxPlugins.resurrect;
          extraConfig = "set -g @resurrect-strategy-nvim 'session'";
        }
        {
          plugin = tmuxPlugins.continuum;
          extraConfig = ''
            set -g @continuum-restore 'on'
            set -g @continuum-save-interval '60' # minutes
          '';
        }
        tmuxPlugins.better-mouse-mode
      ];
      extraConfig = ''
        set -g status-right '#[fg=black,bg=color15] #{cpu_percentage}  %H:%M '
        run-shell ${pkgs.tmuxPlugins.cpu}/share/tmux-plugins/cpu/cpu.tmux
        set -g default-terminal "xterm-256color"
        set -ga terminal-overrides ",*256col*:Tc"
        set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
        set-environment -g COLORTERM "truecolor"

        # Mouse works as expected
        set-option -g mouse on
        # easy-to-remember split pane commands
        bind | split-window -h -c "#{pane_current_path}"
        bind - split-window -v -c "#{pane_current_path}"
        bind c new-window -c "#{pane_current_path}"
      '';
    };
  };

  services = {
    nextcloud-client.enable = lib.mkDefault true;
    pass-secret-service.enable = lib.mkDefault true;
  };
}
