{ pkgs, inputs, ... }:

let
  username = "sadorowo";
  homeDirectory = "/home/${username}";
in
{
  imports = [ ./modules.nix ];

  home = {
    inherit username homeDirectory;

    packages = import ./packages.nix { inherit pkgs inputs; };
    sessionVariables = {
      NIXOS_OZONE_WL = "1";
      TZ = "Europe/Warsaw";
    };
  };

  nixpkgs.config = {
    permittedInsecurePackages = [
      "fluffychat-linux-1.26.0"
      "olm-3.2.16"
    ];

    allowUnfreePredicate =
      pkg:
      builtins.elem (pkgs.lib.getName pkg) [
        "davinci-resolve"
        "anydesk"
      ];
  };

  programs.home-manager.enable = true;
  home.stateVersion = "24.11";
}
