{  inputs, config, pkgs, lib, ... }:

{
  imports = [
    ./shells.nix
    ./music.nix
    ./theming.nix
    ./terminals.nix
    ./termtools.nix
    ./editors.nix
    ./docs.nix
    ./utils.nix
    ./subs/mpv.nix
    ./subs/git.nix
    ./hyprland.nix
  ];

  nixpkgs.config.allowUnfree = true;

  home = {
    username = "dpv";
    homeDirectory = "/home/dpv";
    stateVersion = "24.11";
  };

  home.packages = with pkgs; [
    qbittorrent yt-dlp typst obs-studio krita
    jetbrains.idea-community astro-language-server
    basedpyright emmet-language-server lua-language-server
    tailwindcss-language-server typescript-language-server
    ripcord abaddon netcat-gnu nmap zotero nerd-fonts.jetbrains-mono
    nerd-fonts.fira-code
  ];

  home.file = {
    ".ideavimrc".source = ../config/ideavimrc;
    ".local/bin/books".source = ../bin/books;
    ".local/bin/clipboard".source = ../bin/clipboard;
    ".local/bin/define".source = ../bin/define;
    ".local/bin/keyboard-toggle".source = ../bin/keyboard-toggle;
    ".local/bin/show_colors".source = ../bin/show_colors;
    ".local/bin/show_def".source = ../bin/show_def;
    ".local/bin/stm".source = ../bin/stm;
    ".local/bin/tmux-sessionizer".source = ../bin/tmux-sessionizer;
    ".local/bin/touchpad-toggle-xinput".source = ../bin/touchpad-toggle-xinput;
    ".local/share/applications/camera.desktop".source = ../misc/camera.desktop;
    ".local/share/applications/nsxiv.desktop".source = ../misc/nsxiv.desktop;
  };

  home.activation.createDirs = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
    mkdir -p "${config.home.homeDirectory}/dev/gitlab"
    mkdir -p "${config.home.homeDirectory}/Documents/org"
    mkdir -p "${config.home.homeDirectory}/.local/src"
  '';

  ### SESSION ENV
  home.sessionPath = [ "$HOME/.local/bin" ];

  programs.vesktop.enable = true;

  programs.gpg = {
    enable = true;
    homedir = "${config.xdg.dataHome}/gnupg";
    publicKeys = [
      { source = ../misc/pgp/daryllepv.pub; trust = 5; }
    ];
  };

  services.gpg-agent = {
    enable = true;
    enableZshIntegration = true;
  };

  programs.home-manager.enable = true;
}
