{ pkgs, ... }@all: with all;
{
  users.defaultUserShell = pkgs.bash; # if interactive, itll switch to fish

  users.users."${hyper.user}" = {
    isNormalUser = true;
    extraGroups = [ 
      # TODO: actually put the groups into the relevant files
      "networkmanager" 
      "wheel" 
      "audio" 
      "video" 
      "lp"
      "scanner"
      "docker" 
      "libvirtd" 
      "uinput" 
      "input" 
      "ydotool" 
      "acme" 
      "nginx" 
      "adbusers" 
      "postgres"
      "radicale"
      "audiobookshelf"
      "nextcloud"
    ];
    useDefaultShell = true;
    openssh.authorizedKeys.keys = [
      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID1RPCcS8DtIf75a2FEW4d8X6WTVeLlmretoLqppvZlJ" # From [A] GPG Sub Key
    ];
  };

  programs = {
    bash = {
      interactiveShellInit = ''
        if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
        then
          shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
          exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
        fi
      '';
    };
  };
}
