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

{
  # Home Manager needs a bit of information about you and the paths it should
  # manage.
  home.username = "sid";
  home.homeDirectory = "/home/sid";

  # This value determines the Home Manager release that your configuration is
  # compatible with. This helps avoid breakage when a new Home Manager release
  # introduces backwards incompatible changes.
  #
  # You should not change this value, even if you update Home Manager. If you do
  # want to update the value, then make sure to first check the Home Manager
  # release notes.
  home.stateVersion = "25.05"; # Please read the comment before changing.

  # The home.packages option allows you to install Nix packages into your
  # environment.
  home.packages = with pkgs; [
    gnupg
    pinentry-curses
    hyprpaper
    inputs.zen-browser.packages."x86_64-linux".default
    sops
    age
  ];

  sops = {
    defaultSopsFile = "../../.sops.yaml";
    defaultSopsFormat = "yaml";
    age.keyFile = "/home/sid/.config/sops/age/keys.txt";
  };

  # Home Manager is pretty good at managing dotfiles. The primary way to manage
  # plain files is through 'home.file'.
  home.file = {
  };

  # Home Manager can also manage your environment variables through
  # 'home.sessionVariables'. These will be explicitly sourced when using a
  # shell provided by Home Manager. If you don't want to manage your shell
  # through Home Manager then you have to manually source 'hm-session-vars.sh'
  # located at either
  #
  #  ~/.nix-profile/etc/profile.d/hm-session-vars.sh
  #
  # or
  #
  #  ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
  #
  # or
  #
  #  /etc/profiles/per-user/sid/etc/profile.d/hm-session-vars.sh
  #
  home.sessionVariables = {
    # EDITOR = "emacs";
  };

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

	programs = {
		# Nixhelper
		nh = {
			enable = true;
			clean.enable = true;
			clean.extraArgs = "--keep-since 4d --keep 3";
			flake = "../../flake.nix";
		};

		# Vim config
    vim = {
      enable = true;
      settings = {
        expandtab = true;
        tabstop = 2;
        shiftwidth = 2;
      };
    };

    # Enable fish
    fish = {
      enable = true;
      interactiveShellInit = ''
        fastfetch
      '';
    };

    # Hyprland stuff
    wofi.enable = true;
    waybar.enable = true;
  };

  services = {
    # GPG setup
    gpg-agent = {
      enable = true;
      pinentry.package = pkgs.pinentry-curses;
    };

    # USB-connection
    udiskie.enable = true;

    # Hyprland stuff
    hyprpaper = {
      enable = true;
      settings = {
        splash = true;
        preload = [ "~/nix-dots/.github/assets/evangelion_unit-01.png" ];
        wallpaper = [ ",~/nix-dots/.github/assets/evangelion_unit-01.png" ];
      };
    };
  };
}
