{ pkgs, inputs, config, ... }:
let
  ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
  uid = 1001;
in
{
  users.groups.trent.gid = uid;
  users.users.trent = {
    description = "Trent Guthrie";
    extraGroups = [
      "audio"
      "video"
      "wheel"
    ] ++ ifTheyExist [
      "adbusers"
      "dialout"
      "gamemode"
      "networkmanager"
      "vboxsf"
      "vboxusers"
    ];
    group = "trent";
    home = "/home/trent";
    isNormalUser = true;
    openssh.authorizedKeys.keys = [
      (builtins.readFile ./keys/id.pub)
      #(builtins.readFile ./keys/id_other.pub)
    ];

    packages = [ pkgs.home-manager ];
    shell = pkgs.bash;
    uid = uid;
  };
}
