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

{

  imports = with nix-config.homeModules; [
    niri
    waybar
    swaync
    mpv
    hyprlock
    hypridle
    sway-launcher-desktop
  ];

  home.packages = with pkgs; [

    filen-desktop
    filen-cli

    szyszka

    appimage-run
    libappimage
    transmission_4-gtk
    wl-clipboard
    clipse
    wayland-utils
    libheif.out
    rpi-imager
    freecad
    flatpak
    prusa-slicer
    via
    vial
    pdfarranger
    tdf
    pdfchain
    pdftk
    zathura
    gpu-viewer
    foliate
    wl-mirror
    soundconverter
    wmctrl

    scribus
    gimp3

    # godot_4
    # gdtoolkit_4

    epsonscan2
    sane-airscan
    xsane

    bitwarden-cli
    bitwarden-desktop
    tailscale
    trayscale
    font-manager

    papers
    newsflash

    stirling-pdf
    ripdrag

    polychromatic

    swayidle
    emojify
    smile

    impression
    zoom-us
    nyxt
    ungoogled-chromium
    obsidian
    vlc
    discord
    slack
    signal-desktop-bin
    libreoffice
    hyphenDicts.en_US
    plex-mpv-shim
    plexamp

    switcheroo

    blender
    davinci-resolve-studio
    processing
    zotero
    fractal
    handbrake
    gmic
    krita
    krita-plugin-gmic
    rawtherapee
    inkscape

    # (kicad.override {
    #   addons = with pkgs.kicadAddons; [ kikit kikit-library ];
    # })

    turbocase
    openscad-unstable
    openscad-lsp

    picard
    plugdata
    pavucontrol
    qpwgraph
    clapper
    ardour
    oculante
    halloy
    paleta
    wayback
    protonplus
    fstl

    librewolf

    wl-color-picker

    # screen recording and streaming
    kooha
    obs-studio
    obs-studio-plugins.wlrobs
    obs-studio-plugins.obs-gstreamer

    wineWowPackages.stagingFull
    winetricks

    virt-manager

    gnome-photos
    gnome-tweaks
    nautilus
    nautilus-open-any-terminal
    turtle
    gnome-online-accounts
    gnome-online-accounts-gtk

    wordbook

    protonup
    mangohud
    dualsensectl.out

    wpaperd

    # zulip
    # revolt-desktop

    inputs.xwayland-satellite.packages.x86_64-linux.default
  ];

  home.pointerCursor = {
    name = pkgs.rice.cursor.name;
    package = pkgs.bibata-cursors;
    size = 32;
    gtk.enable = true;
    x11.enable = true;
  };

  gtk = {
    enable = true;
    cursorTheme = {
      name = pkgs.rice.cursor.name;
      package = pkgs.bibata-cursors;
    };
    theme = {
      name = "Colloid";
      package = pkgs.colloid-gtk-theme.override {
        colorVariants = [ "dark" ];
        tweaks = [ "normal" "nord" ];
        themeVariants = [ "grey" ];
      };
    };
    iconTheme = {
      name = "Colloid";
      package = pkgs.colloid-icon-theme;
    };
  };

  qt = {
    enable = true;
    platformTheme = {
      name = "gtk";
    };
    style = {
      package = pkgs.adwaita-qt;
      name = "adwaita-dark";
    };
  };

  dconf.settings = {
    "org/gnome/desktop/interface" = {
      color-scheme = "prefer-dark";
      gtk-theme = lib.mkForce "Colloid-Grey-Dark-Nord";
    };
  };

  fonts = {
    fontconfig = {
      enable = true;
    };
  };

  services = {
    flatpak = {
      enable = true;
      packages = [
        "com.github.tchx84.Flatseal"
        "dev.qwery.AddWater"
        "com.valvesoftware.SteamLink"
      ];
    };
    swayosd = {
      enable = true;
    };
  };

  xdg.configFile."wpaperd/config.toml".source = ../../homes/emenel/dotfiles/dot_config/wpaperd/config.toml;
  home.file.".local/wallpapers".source = ../../assets/wallpapers;

  xdg.desktopEntries = {
    rmpc = {
      name = "rmpc (music player)";
      exec = "/home/emenel/.local/bin/wezapp rmpc";
    };
    ncmpcpp = {
      name = "ncmpcpp (music player)";
      exec = "/home/emenel/.local/bin/wezapp ncmpcpp";
    };
    isd = {
      name = "isd (interactive systemd)";
      exec = "/home/emenel/.local/bin/wezapp isd";
      categories = [ "System" ];
    };
    mirror-laptop = {
      name = "mirror laptop";
      exec = "/home/emenel/.local/bin/mirror-laptop";
      categories = [ "System" ];
    };
    btop = {
      name = "btop++";
      exec = "/home/emenel/.local/bin/wezapp btop";
      categories = [ "System" ];
    };
    steam-offload = {
      name = "Steam (nvidia-offload)";
      exec = "nvidia-offload ${pkgs.steam}/bin/steam";
    };
    bluetui = {
      name = "bluetui (bluetooth manager)";
      exec = "/home/emenel/.local/bin/wezapp bluetui";
    };
    color-picker-clip = {
      name = "wl color picker (clipboard)";
      exec = "${pkgs.wl-color-picker}/bin/wl-color-picker clipboard";
    };
    color-picker = {
      name = "wl color picker";
      exec = "${pkgs.wl-color-picker}/bin/wl-color-picker";
    };
  };

  xdg.configFile."halloy/config.toml".source = ../../homes/emenel/dotfiles/dot_config/halloy/config.toml;
  # xdg.configFile."nyxt/config.lisp".source = ../../homes/emenel/dotfiles/dot_config/nyxt/config.lisp;
}
