{ pkgs, pkgs-unstable, lib, host, user, inputs, ... }:
{
  imports = [
    ./home-modules/auto-mount.nix
    ./home-modules/bash.nix
    ./home-modules/bitwarden.nix
    ./home-modules/chatterino.nix
    ./home-modules/color-pallete.nix
    ./home-modules/direnv.nix
    ./home-modules/discord.nix
    ./home-modules/email.nix
    ./home-modules/firefox.nix
    ./home-modules/fish.nix
    # ./home-modules/foot.nix
    ./home-modules/games.nix
    ./home-modules/gestures.nix
    ./home-modules/git.nix
    ./home-modules/gpg.nix
    ./home-modules/gtk.nix
    ./home-modules/helix.nix
    ./home-modules/hyprland-autoname-workspaces.nix
    ./home-modules/hyprland.nix
    ./home-modules/kitty.nix
    ./home-modules/latex.nix
    ./home-modules/mako.nix
    # ./home-modules/matrix.nix
    ./home-modules/nh.nix
    ./home-modules/nvidia.nix
    ./home-modules/nx-gcal-event.nix
    ./home-modules/obs.nix
    ./home-modules/office.nix
    ./home-modules/ollama.nix
    ./home-modules/pandoc.nix
    ./home-modules/pnx.nix
    ./home-modules/programming/c.nix
    ./home-modules/programming/gleam.nix
    ./home-modules/programming/node.nix
    ./home-modules/programming/python.nix
    ./home-modules/qt.nix
    ./home-modules/rofi.nix
    ./home-modules/sent.nix
    ./home-modules/sops.nix
    ./home-modules/ssh.nix
    ./home-modules/starship.nix
    ./home-modules/vale.nix
    ./home-modules/virt-manager.nix
    ./home-modules/vscode.nix
    ./home-modules/wallpaper-to-colors.nix
    ./home-modules/waybar.nix
    ./home-modules/wlogout.nix
    ./home-modules/yazi.nix
    ./home-modules/zoxide.nix  ];
  home.username = user;
  home.homeDirectory = "/home/${user}";
  home.stateVersion = "24.05";
  home.packages = with pkgs; [
    chromium 
    
    zathura 
    xfce.thunar
    
    spotify 
    spicetify-cli
    
    swww playerctl
    
    imv mpv mediainfo exiftool ffmpeg
    pavucontrol
    fontpreview gtk2fontsel
    lynx w3m browsh
    bat du-dust eza neofetch tldr fzf figlet ripgrep lolcat jq glow
    brightnessctl wev 
    piper-tts
    sssnake pipes
    dig
    screen

    gnumake
    cmake
  
    speedtest-go

    glib
    gsettings-desktop-schemas
    wl-clipboard
    xclip
    xournal

    inputs.zen-browser.packages."${system}".default
    
  ] ++ (with pkgs-unstable; [
    obsidian
    firefox
  ]) ++ (if host != "NxACE" then (with pkgs; [
    signal-desktop
    zoom-us
    gimp 
    inkscape
  ]) else (with pkgs-unstable; [
    
  ]));

  xdg = {
    enable = true;
    configHome = /home/${user}/.config;
    cacheHome = /home/${user}/.cache;
    dataHome = /home/${user}/.local/share;
    stateHome = /home/${user}/.local/state;
    mimeApps = {
      enable =  true;
      defaultApplications = 
        let
          browser = "firefox.desktop";
        in
        {
          "default-web-browser" = [ browser ];
          "text/html" = [ browser ];
          "text/htm" = [ browser ];
          "x-scheme-handler/http" = [ browser ];
          "x-scheme-handler/https" = [ browser ];
          "x-scheme-handler/about" = [ browser ];
          "x-scheme-handler/unknown" = [ browser ];
          "x-scheme-handler/mailto" = "thunderbird.desktop";
          "image/png" = "imv.desktop";
          "image/jpg" = "imv.desktop";
          "image/jpeg" = "imv.desktop";
          "image/webp" = "imv.desktop";
          "image/gif" = "imv.desktop";
          "application/pdf" = "zathura.desktop";
          "inode/directory" = "thunar.desktop";
        };
    };
  };
  # Wayland, X, etc. support for session vars 
  # systemd.user.sessionVariables = home.sessionVariables;

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