After some searching I found the parameters I needed: https://gist.github.com/luetkemj/2023628 (on Line 231)
//////Search Parameter
//http://codex.wordpress.org/Class_Reference/WP_Query#Search_Parameter
's' => $s, //(string) - Passes along the query string variable from a search. For example usage see: http://www.wprecipes.com/how-to-display-the-number-of-results-in-wordpress-search
'exact' => true, //(bool) - flag to make it only match whole titles/posts - Default value is false. For more information see: https://gist.github.com/2023628#gistcomment-285118
'sentence' => true, //(bool) - flag to make it do a phrase search - Default value is false. For more information see: https://gist.github.com/2023628#gistcomment-285118
I added 's' => $s
to my $args
which passes along the query string, which is what I was looking for 🙂
My code now looks like:
$args = array(
'paged' => $paged,
'posts_per_page' => 9,
'post_type' => 'attachment',
's' => $s
);
query_posts($args);