{
  config,
  lib,
  pkgs,
  inputs,
  ...
}: let
  
  platform = if builtins.pathExists "/System/Library/CoreServices" then "darwin" else "nixos";

  # general config
  home_linux = {
    username = "blake";
    homeDirectory = "/home/blake";
  };
  home_darwin = {
    username = "bhelderman";
    homeDirectory = "/Users/bhelderman";
  };
in
{
  imports = [
    inputs.sops-nix.homeManagerModules.sops
    ./dots/core
  ];

  # set home manager config based on system type
  home = (if platform == "darwin" then home_darwin else home_linux) // {
    # cross party general packages here : )
    stateVersion = "25.05";
    packages = with pkgs; [
      fastfetch
      ripgrep
      p7zip
      sops
      usbutils
    ];
  };

  # needed for macos, linux don't mind
  programs.home-manager.enable = true;

  nixpkgs.config = {
    allowUnfree = true;
  };

  # set up seperate key file just for me 
  sops = {
    defaultSopsFile = ./secrets/secrets.yaml;
    defaultSopsFormat = "yaml";
    age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
  };
}
